Allow reboot during runcom.
PR: bin/28116 Submitted by: Valentin Nechayev <netch@netch.kiev.ua> MFC in: 1 week
This commit is contained in:
parent
4c8f0aced5
commit
6e8ff8b760
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85010
@ -814,10 +814,13 @@ runcom()
|
|||||||
/*
|
/*
|
||||||
* Copied from single_user(). This is a bit paranoid.
|
* Copied from single_user(). This is a bit paranoid.
|
||||||
*/
|
*/
|
||||||
|
requested_transition = 0;
|
||||||
do {
|
do {
|
||||||
if ((wpid = waitpid(-1, &status, WUNTRACED)) != -1)
|
if ((wpid = waitpid(-1, &status, WUNTRACED)) != -1)
|
||||||
collect_child(wpid);
|
collect_child(wpid);
|
||||||
if (wpid == -1) {
|
if (wpid == -1) {
|
||||||
|
if (requested_transition == death)
|
||||||
|
return (state_func_t) death;
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
warning("wait for %s on %s failed: %m; going to single user mode",
|
warning("wait for %s on %s failed: %m; going to single user mode",
|
||||||
|
Loading…
Reference in New Issue
Block a user