LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 05: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, 06: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:02 PM.

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
Open Source Consulting | Domain Registration