diff options
author | des <des@FreeBSD.org> | 2001-10-15 20:34:43 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-10-15 20:34:43 +0000 |
commit | a93e80dada4e0076b01458c416d5819c041c491f (patch) | |
tree | 4a14e06aba4ec516f8ae2d176598e3085a11d901 /sbin/init | |
parent | 37d284b4b61a72a0dac0d6b56ba0eb940a2da05c (diff) | |
download | FreeBSD-src-a93e80dada4e0076b01458c416d5819c041c491f.zip FreeBSD-src-a93e80dada4e0076b01458c416d5819c041c491f.tar.gz |
Allow reboot during runcom.
PR: bin/28116
Submitted by: Valentin Nechayev <netch@netch.kiev.ua>
MFC in: 1 week
Diffstat (limited to 'sbin/init')
-rw-r--r-- | sbin/init/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c index b59f288..c97aa75 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", |