Merge pull request #278 from edneville/104_su_waitpid
loop until waitpid returns pid_child or error
This commit is contained in:
commit
6bd08f7d18
4
src/su.c
4
src/su.c
@ -354,7 +354,9 @@ static void prepare_pam_close_session (void)
|
||||
pid_t pid;
|
||||
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
|
||||
* forwarded to the child, and termination will be
|
||||
|
Loading…
Reference in New Issue
Block a user