X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fmount.c;h=a8f3d7b9aac7741e46afcf6b304970eb44e567e9;hp=5577f16dfd7a18ff0cba8919d27bfc886d0d7129;hb=8c47c7325fa1ab72febf807f8831ff24c75fbf45;hpb=17586c16bac1d5ecf7d60ef57d18e82e36c288c1 diff --git a/src/mount.c b/src/mount.c index 5577f16df..a8f3d7b9a 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;