aboutsummaryrefslogtreecommitdiff
path: root/sbin/init
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-11 09:30:18 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-11 09:30:18 +0000
commit126ba2193bdc505c69d051ffc4ec524688f255ab (patch)
tree6fc66abba6e0d859a41893011d188a29cb8d8221 /sbin/init
parentb8a1930fcfed54ec7bba10d9ee3f857a4e89d543 (diff)
Notes
Diffstat (limited to 'sbin/init')
-rw-r--r--sbin/init/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c
index 0070990aeecbc..7355a536b9aa8 100644
--- a/sbin/init/init.c
+++ b/sbin/init/init.c
@@ -779,9 +779,11 @@ reroot(void)
/*
* Make sure nobody can interfere with our scheme.
+ * Ignore ESRCH, which can apparently happen when
+ * there are no processes to kill.
*/
error = kill(-1, SIGKILL);
- if (error != 0) {
+ if (error != 0 && errno != ESRCH) {
emergency("kill(2) failed: %s", strerror(errno));
goto out;
}