X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Fbus-util.c;h=c97bf7d99d04ba775d66158512b3f39592f5b221;hp=475ed34a53d5215a4e837d2f04b77d97ddcb5481;hb=430e21c2f7e77d600257ead56419f511e48e854a;hpb=55cdcbacf70f05a40a155af24f6d2da6b478cba6 diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c index 475ed34a5..c97bf7d99 100644 --- a/src/libsystemd/sd-bus/bus-util.c +++ b/src/libsystemd/sd-bus/bus-util.c @@ -22,6 +22,8 @@ #include #include +#include "systemd/sd-daemon.h" + #include "util.h" #include "strv.h" #include "macro.h" @@ -128,11 +130,17 @@ int bus_event_loop_with_idle( if (r == -EBUSY) continue; + /* Fallback for dbus1 connections: we + * unregister the name and wait for the + * response to come through for it */ if (r == -ENOTSUP) { - /* Fallback for dbus1 connections: we - * unregister the name and wait for - * the response to come through for - * it */ + + /* Inform the service manager that we + * are going down, so that it will + * queue all further start requests, + * instead of assuming we are already + * running. */ + sd_notify(false, "STOPPING=1"); r = bus_async_unregister_and_exit(e, bus, name); if (r < 0)