Hacker News new | past | comments | ask | show | jobs | submit login

kill -0 <pid> to test if a process is alive.

kill -9 -1 to send a KILL to every process.




You're right, nobody mentioned if the process is <defunct>: http://unix.stackexchange.com/a/111316/22558


I went to kill -L and it didn't work! Linux Mint 15 (ubuntu saucy/debian derivative)


Heh 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


Thanks for this, I didn't realize it.

You can disable kill (or any built-in)

Under zsh:

    disable kill 
Under bash:

    enable -n kill


Agree with grinningfool- thank you!

EDIT- at least it looks like the calls are the same.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: