loop until waitpid returns pid_child or error
closes #104 Signed-off-by: ed neville <ed@s5h.net>
This commit is contained in:
parent
9a10373ddb
commit
01a8df79b3
4
src/su.c
4
src/su.c
@ -354,7 +354,9 @@ static void prepare_pam_close_session (void)
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
stop = true;
|
stop = true;
|
||||||
|
|
||||||
pid = waitpid (-1, &status, WUNTRACED);
|
do {
|
||||||
|
pid = waitpid (-1, &status, WUNTRACED);
|
||||||
|
} while (pid != -1 && pid != pid_child);
|
||||||
|
|
||||||
/* When interrupted by signal, the signal will be
|
/* When interrupted by signal, the signal will be
|
||||||
* forwarded to the child, and termination will be
|
* forwarded to the child, and termination will be
|
||||||
|
Loading…
Reference in New Issue
Block a user