[BBLISA] To kill a process tree

Edward Ned Harvey bblisa3 at nedharvey.com
Thu Apr 2 16:43:47 EDT 2009


I know if I simply "kill pid" then the process and all its children will die.  But I don't want to kill them.  I want to "kill -SIGTSTP pid" ... and this works as long as I name all the pids in the process tree.  It does not cascade the signal to all the child processes if I only name the parent pid.

Does anybody know a way to send a specific kill signal to a all the descendents of some specific pid?

FWIW - I read the kill man page, and it's riddled with errors.  The most annoying one was ...

 *
(from man kill) -p Specify that kill should only print the process id (pid) of the named processes, and not send any signals.
 *
So then I did this:
[harveyed at gotham ~]$ ps
PID TTY          TIME CMD
6382 pts/18   00:00:00 bash
20595 pts/18   00:00:00 ps

And:   kill -KILL -p 6382
unfortunately kills my present terminal.   D'Oh!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.bblisa.org/pipermail/bblisa/attachments/20090402/42a02446/attachment.htm 


More information about the bblisa mailing list