diff options
author | des <des@FreeBSD.org> | 2003-02-08 16:11:20 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-02-08 16:11:20 +0000 |
commit | 912192732ebe88be5593c480245730dea382b9dd (patch) | |
tree | 169d30b82e21cb2c10108df59e02e8fe414d43b6 | |
parent | af6bbda282028b511e3cc6651e4036043ac58716 (diff) | |
download | FreeBSD-src-912192732ebe88be5593c480245730dea382b9dd.zip FreeBSD-src-912192732ebe88be5593c480245730dea382b9dd.tar.gz |
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.
-rw-r--r-- | usr.bin/login/login.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 9ded0c0..5eb60fb 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); } |