From e32ea05528363adab8daac1fe5b24f2c3b565eb7 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Mon, 22 Oct 2001 11:27:32 +0000 Subject: MFC: [1.48] allow reboot during runcom (PR bin/28116) --- sbin/init/init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sbin/init') 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", -- cgit v1.3