]> granicus.if.org Git - procps-ng/commitdiff
top: let's not pretend top can catch SIGKILL & SIGSTOP
authorJim Warner <james.warner@comcast.net>
Tue, 24 Jun 2014 05:00:00 +0000 (00:00 -0500)
committerJaromir Capik <jcapik@redhat.com>
Wed, 25 Jun 2014 11:58:30 +0000 (13:58 +0200)
While there was no harm done setting a handler for the
above two signals, they are in fact uncatchable. Thus,
whenever we ran with valgrind we're politely reminded.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index 0094538c06acbb2b56d6c01da8217695cf9d4448..f0369bc43b4f2ac3920f3c91286fd2391d2de0e9 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3342,6 +3342,8 @@ static void before (char *me) {
          default:
             sa.sa_handler = sig_abexit;
             break;
+         case SIGKILL: case SIGSTOP:
+         // because uncatchable, fall through
          case SIGCHLD: // we can't catch this
             continue;  // when opening a pipe
       }