]> git.ipfire.org Git - thirdparty/util-linux.git/commit
kill: add a feature decoding signal masks
authorMasatake YAMATO <yamato@redhat.com>
Sun, 30 Jun 2024 12:09:44 +0000 (21:09 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Wed, 3 Jul 2024 03:00:11 +0000 (12:00 +0900)
commit873370b6298b33ca1c757b3238c70a6ad6d4758e
tree64227334e77069f028e1290c6797c222d7674689
parent6850e89e5b0b35e7bfe90915e56bd598c25f0b10
kill: add a feature decoding signal masks

-l/--list option is extended to work well with the output of ps command:

   $ ps s $$
     UID     PID          PENDING          BLOCKED          IGNORED           CAUGHT STAT TTY        TIME COMMAND
    1000 1588189 0000000000000000 0000000000010000 0000000000384004 000000004b813efb S    pts/56     0:00 bash

   $ ./kill --list 0x000000004b813efb
   HUP
   INT
   ILL
   TRAP
   ABRT
   ...

If you know the pid you are interested in, you can skip running ps
comman with -d/--show-process-state option:

   $ ./kill --show-process-state $$
   Blocked: INT
   Ignored: TERM TSTP TTIN TTOU
   Caught: HUP INT PIPE ALRM CHLD WINCH

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/kill.1.adoc
misc-utils/kill.c