Question about isatty/read usage in dbus-launch
halfline at gmail.com
Fri Dec 1 17:58:46 PST 2006
> I was wondering if people could explain why D-Bus uses isatty()
> and waits for read() to return a Control-D to tell when the user session
> has ended.
There is some discussion about this here:
I think the basic idea is someone might want to do something like
dbus-launch --exit-with-session bash
inside an xterm while debugging or something. If the xterm gets
closed, the message bus that's started needs to be killed. Like wise
if dbus-launch is run from a vt or from an ssh connection the bus
should be killed when the user logs out.
Normally, dbus-launch should receive SIGHUP in these cases, but for
reasons no one understands quite yet, it doesn't always. The read for
hangup solution is to work around the sighup not always arriving.
More information about the dbus