summaryrefslogtreecommitdiffstats
path: root/usr.bin/login/login.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-02-08 16:11:20 +0000
committerdes <des@FreeBSD.org>2003-02-08 16:11:20 +0000
commit912192732ebe88be5593c480245730dea382b9dd (patch)
tree169d30b82e21cb2c10108df59e02e8fe414d43b6 /usr.bin/login/login.c
parentaf6bbda282028b511e3cc6651e4036043ac58716 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'usr.bin/login/login.c')
-rw-r--r--usr.bin/login/login.c3
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);
}
OpenPOWER on IntegriCloud