mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
We wouldn't want to kill init if our parent died...
Spotted by: davidg
This commit is contained in:
parent
3c0d1798b1
commit
b6078f2906
1 changed files with 4 additions and 2 deletions
|
|
@ -137,12 +137,14 @@ tipout()
|
|||
intTERM();
|
||||
/*NOTREACHED*/
|
||||
} else if (cnt == 0 && errno == ENOENT) {
|
||||
kill(getppid(),SIGUSR1);
|
||||
if (getppid() != 1)
|
||||
kill(getppid(),SIGUSR1);
|
||||
sigblock(sigmask(SIGTERM));
|
||||
intTERM();
|
||||
/*NOTREACHED*/
|
||||
} else if (cnt < 0) {
|
||||
kill(getppid(),SIGUSR1);
|
||||
if (getppid() != 1)
|
||||
kill(getppid(),SIGUSR1);
|
||||
sigblock(sigmask(SIGTERM));
|
||||
intTERM();
|
||||
/*NOTREACHED*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue