Merge pull request #72 from stoeckmann/su-regression
Reset pid_child only if waitpid was successful.
This commit is contained in:
commit
8e51ec9ee4
2
src/su.c
2
src/su.c
@ -379,7 +379,7 @@ static void prepare_pam_close_session (void)
|
|||||||
/* wake child when resumed */
|
/* wake child when resumed */
|
||||||
kill (pid, SIGCONT);
|
kill (pid, SIGCONT);
|
||||||
stop = false;
|
stop = false;
|
||||||
} else {
|
} else if ( (pid_t)-1 != pid) {
|
||||||
pid_child = 0;
|
pid_child = 0;
|
||||||
}
|
}
|
||||||
} while (!stop);
|
} while (!stop);
|
||||||
|
Loading…
Reference in New Issue
Block a user