]> granicus.if.org Git - procps-ng/commitdiff
0108-top: Always exit from sig_abexit().
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Sat, 9 Jun 2018 11:35:20 +0000 (21:35 +1000)
The default action for SIGURG is to ignore the signal, for example.
This is very similar to the patch "ps/display.c: Always exit from
signal_handler()."

top/top.c

index eefa6358cf4653af320e6e9b3aaa61ba56122785..69719b07f9bd78e85967e98835858445920f259b 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -419,6 +419,7 @@ static void sig_abexit (int sig) {
       , sig, signal_number_to_name(sig), Myname);
    signal(sig, SIG_DFL);     // allow core dumps, if applicable
    raise(sig);               // ( plus set proper return code )
+   _exit(sig | 0x80);        // if default sig action is ignore
 } // end: sig_abexit