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
5ddbc7e1f7
commit
fea1e414df
@ -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…
Reference in New Issue
Block a user