Question about isatty/read usage in dbus-launch
halfline at gmail.com
Fri Dec 1 19:45:39 PST 2006
> Then we'll have a sort of "dbus-launch roadmap" in the form of the use
> cases plus man page changes. It'd also be nice to figure out the bug Ray
So in comment 22 of that bug, I mentioned that I had spent a little
time trying to strip out the read() call and instead rely on SIGHUP.
For those interested, the patch I was playing with at the time (that
didn't work out) is attached.
I think the problem may have something to do with the way dbus-launch
branches when it forks. At the time I was looking at this, I made a
little graph in my notes of the way it seemed to work:
+---fork()----- sitter intermediate parent
waitpid +---fork()--- exec dbus-daemon
exec prog |
Which seems a bit odd to me. The program passed to dbus-launch ends
up taking over the original PID of dbus-launch, and the first forked
child is what handles spawning the dbus-daemon, and creating a helper
process for watching the session.
I think doing it this way instead of running the passed program in a
subprocess might be contributing to the problem, although I don't have
a clear idea why in my head, and I haven't tried changing things
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3491 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061201/235d72f4/foo.bin
More information about the dbus