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>