Bug 8294

Summary: dbus-launch doesn't exit if dbus-daemon exits/is killed
Product: dbus Reporter: Thiago Macieira <thiago>
Component: coreAssignee: Thiago Macieira <thiago>
Status: RESOLVED DUPLICATE QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: high CC: chengwei.yang.cn, sascha-web-bugs.freedesktop.org, william.jon.mccann
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Thiago Macieira 2006-09-16 02:28:08 UTC
If dbus-launch is started with --exit-with-session, it babysits dbus-daemon. 
If you kill dbus-launch, it kills dbus-daemon. But if you kill dbus-daemon, 
dbus-launch doesn't realise it (since it doesn't get a SIGCHLD) and doesn't 
exit.

A simple solution is to keep open a pipe between the two processes. When 
dbus-daemon exits, the pipe will generate a SIGPIPE and dbus-launch can exit 
upon select(2).
Comment 1 Simon McVittie 2011-01-19 10:47:49 UTC
Slightly better summary, stolen from Bug #28556
Comment 2 Simon McVittie 2011-01-19 10:47:56 UTC
*** Bug 28556 has been marked as a duplicate of this bug. ***
Comment 3 Simon McVittie 2011-07-14 09:42:30 UTC
This is complicated by the fact that dbus-daemon daemonizes, closing all extra file descriptors...

One nice way that dbus-launch could detect a dbus-daemon crash would be to connect to dbus-daemon itself, using D-Bus. I hear that's a reasonable IPC mechanism these days :-)
Comment 4 Chengwei Yang 2013-12-10 13:47:40 UTC

*** This bug has been marked as a duplicate of bug 69877 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.