Summary: | dbus-launch will refuse start a dbus-daemon though the previous started was terminated | ||
---|---|---|---|
Product: | dbus | Reporter: | Chengwei Yang <chengwei.yang.cn> |
Component: | core | Assignee: | D-Bus Maintainers <dbus> |
Status: | RESOLVED MOVED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | normal | ||
Priority: | medium | CC: | chengwei.yang.cn, msniko14, thiago |
Version: | 1.5 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Chengwei Yang
2013-09-27 10:27:56 UTC
I think the solution is probably to have dbus-launch connect to its own dbus-daemon (without turning off exit-on-disconnect), so that it will automatically exit if the dbus-daemon goes away. That would require dbus-launch to link to either libdbus-1 (shared library) or libdbus-internal (murky static library), preferably the former, but I think that'd be fine. If people like dbus-launch, review/testing of the new --exit-with-x11 option on Bug #39197 would also be useful. It addresses the dbus-launch misfeature that "--exit-with-session" tries to work in a non-X11 environment, and tries to poll a terminal on its stdin to detect the end of a tty session (even though it's not clear whether that actually works). One day, I would like dbus-launch to be an X11-specific historical curiosity that nobody actually uses any more - it shouldn't be used in Wayland, for instance. (In reply to comment #1) > I think the solution is probably to have dbus-launch connect to its own > dbus-daemon (without turning off exit-on-disconnect), so that it will > automatically exit if the dbus-daemon goes away. Just investigated this solution, seems it doesn't work. exit-on-disconnect means the program will call _exit() after handled disconnected signal. However, if dbus-daemon was killed, it didn't send disconnected signal before exit. > > That would require dbus-launch to link to either libdbus-1 (shared library) > or libdbus-internal (murky static library), preferably the former, but I > think that'd be fine. (In reply to comment #3) > However, if dbus-daemon was killed, it didn't send disconnected signal > before exit. Really? I thought the Disconnected signal was synthesized client-side by libdbus when the kernel notifies it that the socket has been closed? After all, clients that send invalid UTF-8 normally get an unceremonious close() from the dbus-daemon, and then _exit() when that happens (indeed, plenty of people, including me, have complained about that behaviour). *** Bug 8294 has been marked as a duplicate of this bug. *** -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/90. |
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.