summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-16 05:10:31 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-16 05:10:31 +0200
commit8c47c7325fa1ab72febf807f8831ff24c75fbf45 (patch)
tree3a116267ab7c0edbfdb32bbd2b6ea222436fcce3 /src/mount.c
parent17586c16bac1d5ecf7d60ef57d18e82e36c288c1 (diff)
notify: add minimal readiness/status protocol for spawned daemons
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c8
1 files changed, 5 insertions, 3 deletions
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;