summaryrefslogtreecommitdiff
path: root/sbin/init
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-10-22 11:27:32 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-10-22 11:27:32 +0000
commite32ea05528363adab8daac1fe5b24f2c3b565eb7 (patch)
tree87b00c96d9fc7213ec932239d9a27c8aabe04de7 /sbin/init
parente1656d9678c6eb5df53f76d0edf1d0fc9f574ec7 (diff)
Notes
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 16553cf3a39d..d020dfbaf3bc 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -792,10 +792,13 @@ runcom()
/*
* Copied from single_user(). This is a bit paranoid.
*/
+ requested_transition = 0;
do {
if ((wpid = waitpid(-1, &status, WUNTRACED)) != -1)
collect_child(wpid);
if (wpid == -1) {
+ if (requested_transition == death)
+ return (state_func_t) death;
if (errno == EINTR)
continue;
warning("wait for %s on %s failed: %m; going to single user mode",