Question about isatty/read usage in dbus-launch

Ray Strode halfline at gmail.com
Fri Dec 1 17:58:46 PST 2006


Hi,

> 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:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214649

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.

--Ray


More information about the dbus mailing list