LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2008, 04:00 PM   #1
thecake
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Rep: Reputation: 0
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.

Last edited by thecake; 12-19-2008 at 04:09 PM.
 
Old 12-22-2008, 05:50 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
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'?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to kill a process and all of its children & grandchildren. How? BrianK Linux - General 4 10-31-2008 02:36 PM
Sigkill suhanduman Linux - Enterprise 2 12-05-2007 06:08 AM
sending signals jiya_31 Linux - Software 3 10-25-2007 04:59 PM
Sending a signal to a process (Help me) rajesh_b Programming 2 09-17-2004 02:30 AM
sending process to background Robert0380 Linux - General 5 12-31-2002 04:33 PM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration