LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sending SIGKILL/signals to process and all children? (https://www.linuxquestions.org/questions/linux-newbie-8/sending-sigkill-signals-to-process-and-all-children-691762/)

thecake 12-19-2008 03:00 PM

Sending SIGKILL/signals to process and all children?
 
kill -9 pid seems to kill a process and orphan all child processes. From my understanding a standard SIGTERM signal relies on the receiving process to send termination/whatever signals to it's children, which SIGKILL doesn't give it a chance to do.

So how can I manually send SIGKILL to all children without doing it by hand or having to write a shell script (pstree and some awk/sed could probably do it, but It would be nice if there was a "default" way).

The gdm and child processes don't belong to the same process group, so kill -pid won't do it.



My need for this comes from gnome crashing when I enable certain compiz plugins (buggy video drivers supposedly). The gdm will only respond to SIGKILL, and using this orphans all the children. From this point I need to either restart, or manually SIGKILL all the pids.

unSpawn 12-22-2008 04:50 PM

Something like 'pkill -KILL -f gdm' or 'pgrep -f gdm|xargs kill -9'? If that doesn't do it, and you are sure it is not due to a version of GDM that really needs to be updated, maybe supply more process info running something like '/bin/ps axf -eo ppid,pid,sid,uid,args --sort=ppid'?


All times are GMT -5. The time now is 06:04 PM.