4 ms·
kill -0 <pid> to test if a process is alive. kill -9 -1 to send a KILL to every process.
by ballard 13y ago
kill -0 <pid> to test if a process is alive.
kill -9 -1 to send a KILL to every process.
- dhimes 13y agoI went to kill -L and it didn't work! Linux Mint 15 (ubuntu saucy/debian derivative)
- warnhardcode 13y agoHeh I went to try it and sure enough it was in the manpage but didn't work on the commandline because.....manpage was for /bin/kill but from the commandline I was using the builtin kill. WOW! % kill -L kill: unknown signal: SIGV kill: type kill -l for a list of signals % which kill kill: shell built-in command % /bin/kill -L 1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS 8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM 15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN 22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH 29 POLL 30 PWR 31 SYS
- GrinningFool 13y agoThanks for this, I didn't realize it. You can disable kill (or any built-in) Under zsh: disable kill Under bash: enable -n kill
- deleted 13y ago[deleted]
- dhimes 13y agoAgree with grinningfool- thank you! EDIT- at least it looks like the calls are the same.
- yiedyie 13y agoYou're right, nobody mentioned if the process is <defunct>: http://unix.stackexchange.com/a/111316/22558 http://unix.stackexchange.com/a/111316/22558