When kill(-1) returns ESRCH, it could be because the current process
doesn't have a process group, which can occur if you're working with a custom init that doesn't set up a full tty context. Rather than refusing to reboot, ignore ESRCH from the kill attempt in reboot(8).
This commit is contained in:
parent
c0b4f09416
commit
3997bed507
@ -164,7 +164,7 @@ main(int argc, char *argv[])
|
||||
(void)signal(SIGHUP, SIG_IGN);
|
||||
|
||||
/* Send a SIGTERM first, a chance to save the buffers. */
|
||||
if (kill(-1, SIGTERM) == -1)
|
||||
if (kill(-1, SIGTERM) == -1 && errno != ESRCH)
|
||||
err(1, "SIGTERM processes");
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user