diff --git a/sbin/init/init.c b/sbin/init/init.c index b59f288c16c5..c97aa75ddb7b 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -814,10 +814,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",