1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-04 17:15:50 +00:00

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:
Robert Watson 2003-04-02 22:13:56 +00:00
parent 6751370f6f
commit 6ab0d6c220
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112991

View File

@ -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");
/*