]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/systemd/sd-bus.h
sd-bus: optionally, exit process or event loop on disconnect
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2016 15:19:12 +0000 (17:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2016 15:31:41 +0000 (17:31 +0200)
commitfbb4603d487d329bdd7aff744ff9ba7a7c2a2965
treed98d4204506d5a7a71d158c9f3aff31a891483c7
parent2c5f295823028bd4cf8250d1e4e56a8712f78cc8
sd-bus: optionally, exit process or event loop on disconnect

Old libdbus has a feature that the process is terminated whenever the the bus
connection receives a disconnect. This is pretty useful on desktop apps (where
a disconnect indicates session termination), as well as on command line apps
(where we really shouldn't stay hanging in most cases if dbus daemon goes
down).

Add a similar feature to sd-bus, but make it opt-in rather than opt-out, like
it is on libdbus. Also, if the bus is attached to an event loop just exit the
event loop rather than the the whole process.
src/libsystemd/libsystemd.sym
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/sd-bus.c
src/systemd/sd-bus.h