ps/display.c: Always exit from signal_handler().
Right now, "we _exit() anyway" is not always true: for example, the default action for SIGURG is to ignore the signal, which means that "kill(getpid(), signo);" does not terminate the process. Call _exit() explicitly, in this case (rather than exit(), because the terminating kill() calls do not call the functions registered with atexit() either).
This commit is contained in:
parent
7dd7bdb09f
commit
2e4a594221
@ -66,6 +66,7 @@ static void signal_handler(int signo){
|
|||||||
error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
|
error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
|
||||||
signal(signo, SIG_DFL); /* allow core file creation */
|
signal(signo, SIG_DFL); /* allow core file creation */
|
||||||
kill(getpid(), signo);
|
kill(getpid(), signo);
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user