From 7bd4f0b6d7e058197ccf4234f2a0bcc17550d0a6 Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] 0062-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). --- ps/display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ps/display.c b/ps/display.c index 5cfee84b..a7eee15e 100644 --- a/ps/display.c +++ b/ps/display.c @@ -62,6 +62,7 @@ static void signal_handler(int signo){ error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug")); signal(signo, SIG_DFL); /* allow core file creation */ kill(getpid(), signo); + _exit(EXIT_FAILURE); } }