From fea1e414dfd9fb72c9a7e879c2bed71493a6db95 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Sat, 8 Feb 2003 16:11:20 +0000 Subject: 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. --- usr.bin/login/login.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 9ded0c057381..5eb60fbceeee 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -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); } -- cgit v1.3