Edward Ned Harvey wrote: > 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: > [harve...@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!! > > ------------------------------------------------------------------------ > > _
Have you looked at the pstree command? If you parse the output of something like: pstree -A -p 1234 you should be able to get the PIDs of interest. - Richard _______________________________________________ Tech mailing list [email protected] http://lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/
