Use waitpid() instead of wait() since we know the pid of the process we
are waiting for, and we don't want to reap the wrong process.
This commit is contained in:
parent
af6bbda282
commit
912192732e
@ -506,8 +506,9 @@ main(int argc, char *argv[])
|
||||
* Parent: wait for child to finish, then clean up
|
||||
* session.
|
||||
*/
|
||||
int status;
|
||||
setproctitle("-%s [pam]", getprogname());
|
||||
wait(NULL);
|
||||
waitpid(pid, &status, 0);
|
||||
bail(NO_SLEEP_EXIT, 0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user