notify: add minimal readiness/status protocol for spawned daemons

This commit is contained in:
Lennart Poettering
2010-06-16 05:10:31 +02:00
parent 17586c16ba
commit 8c47c7325f
18 changed files with 516 additions and 25 deletions
+5 -3
View File
@@ -1228,12 +1228,14 @@ static void socket_sigchld_event(Unit *u, pid_t pid, int code, int status) {
assert(s);
assert(pid >= 0);
if (pid != s->control_pid)
return;
s->control_pid = 0;
success = is_clean_exit(code, status);
s->failure = s->failure || !success;
assert(s->control_pid == pid);
s->control_pid = 0;
if (s->control_command)
exec_status_fill(&s->control_command->exec_status, pid, code, status);