}
static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
+ bool notify_dbus = true;
Service *s = SERVICE(u);
ServiceResult f;
assert_not_reached("Uh, control process died at wrong time.");
}
}
- }
+ } else /* Neither control nor main PID? If so, don't notify about anything */
+ notify_dbus = false;
/* Notify clients about changed exit status */
- unit_add_to_dbus_queue(u);
+ if (notify_dbus)
+ unit_add_to_dbus_queue(u);
/* We got one SIGCHLD for the service, let's watch all
* processes that are now running of the service, and watch