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:
Dag-Erling Smørgrav 2003-02-08 16:11:20 +00:00
parent 5ddbc7e1f7
commit fea1e414df

View File

@ -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);
}