LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-05-2010, 06:02 AM   #1
brianhickey18
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
PKILL process


Hey guys,
I am trying to kill a process.
I am using a Python handler and having a problem killing both the parent and all the child process belonging to it.

here is what i'm trying
pkill -p $pid && (sleep 5; kill -SIGTERM $pid) && (sleep 5; kill -SIGKILL $pid)
kill $pid && (sleep 5; kill -SIGTERM $pid) && (sleep 5; kill -SIGKILL $pid)


#Where $pid is the parent process id.

I'm fairly new to this so an help would be appreciated! Thanks!!
 
Old 05-05-2010, 07:38 AM   #2
brianhickey18
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
just figured it out.
should of used -P and not -p
woooops!!
 
  


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
[SOLVED] pkill -KILL -u root ...... is that bad??? KZeeSoft Linux - Server 7 03-13-2010 11:17 AM
can't stop a process using pkill 2007fld Linux - Server 4 09-12-2007 09:13 AM
when a process cann't be terminated through kill/skill/pkill/killall... Osirix Linux - Software 9 07-19-2006 12:16 AM
pkill ssh elohmrow Linux - Security 2 08-25-2005 10:51 AM
pgrep/pkill d3funct Linux - General 0 09-18-2001 03:30 PM


All times are GMT -5. The time now is 06:29 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