From 6e8ff8b760993905a059e41d19f725034bf87dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 15 Oct 2001 20:34:43 +0000 Subject: [PATCH] Allow reboot during runcom. PR: bin/28116 Submitted by: Valentin Nechayev MFC in: 1 week --- sbin/init/init.c | 3 +++ 1 file changed, 3 insertions(+) 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",