From 8c47c7325fa1ab72febf807f8831ff24c75fbf45 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 16 Jun 2010 05:10:31 +0200 Subject: notify: add minimal readiness/status protocol for spawned daemons --- src/mount.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mount.c') diff --git a/src/mount.c b/src/mount.c index 5577f16dfd..a8f3d7b9aa 100644 --- a/src/mount.c +++ b/src/mount.c @@ -921,12 +921,14 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) { assert(m); assert(pid >= 0); - success = is_clean_exit(code, status); - m->failure = m->failure || !success; + if (pid != m->control_pid) + return; - assert(m->control_pid == pid); m->control_pid = 0; + success = is_clean_exit(code, status); + m->failure = m->failure || !success; + if (m->control_command) { exec_status_fill(&m->control_command->exec_status, pid, code, status); m->control_command = NULL; -- cgit v1.2.3-54-g00ecf