Don't call exit(3) from a signal handler.
Obtained from: OpenBSD
This commit is contained in:
parent
9e28aca5d2
commit
e0e97f0aab
@ -104,6 +104,5 @@ terminate(sig)
|
||||
int sig;
|
||||
{
|
||||
|
||||
/* XXX exit() shouldn't call exit() from a signal handler. */
|
||||
exit(sig == 0 ? 0 : 1);
|
||||
_exit(sig == 0 ? 0 : 1);
|
||||
}
|
||||
|
@ -1400,7 +1400,7 @@ handle_hup(signo)
|
||||
strcat(hup, "ed.hup");
|
||||
write_file(hup, "w", 1, addr_last);
|
||||
}
|
||||
quit(2);
|
||||
_exit(2);
|
||||
}
|
||||
|
||||
|
||||
@ -1409,7 +1409,7 @@ handle_int(signo)
|
||||
int signo;
|
||||
{
|
||||
if (!sigactive)
|
||||
quit(1);
|
||||
_exit(1);
|
||||
sigflags &= ~(1 << (signo - 1));
|
||||
#ifdef _POSIX_SOURCE
|
||||
siglongjmp(env, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user