LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-17-2007, 05:23 AM   #1
jago25_98
Member
 
Registered: Jun 2001
Posts: 278

Rep: Reputation: 30
kill -9 and respawns as new pid


I have a process here that I can't get rid of.

As soon as I kill the process it respawns with a new pid. Same with `kill -9` and `kill -15`.

Looking through the process list shows no clues as to any parent process, but from memory I believe the original command was `while :; do <command> ;done`
 
Old 06-17-2007, 11:46 AM   #2
dawkcid
Member
 
Registered: May 2007
Location: UK
Distribution: LFS,Slackware,Slamd64,NetBSD
Posts: 102

Rep: Reputation: 15
So that's

while true; do run_this_command; done

so obviously it's going to keep respawning. Kill the shell running the while loop.

The parent process (i.e. the shell) should be shown in the ps output, e.g. with ps -ef, it's column 3.
 
Old 06-18-2007, 04:54 AM   #3
jago25_98
Member
 
Registered: Jun 2001
Posts: 278

Original Poster
Rep: Reputation: 30
There are no clues in the other processes listed with ps -auxefas to which is spawning the command. I'm looking at that 3rd column trying to figure out the link.

There are 5 bash shell processes but I don't know which is the one running the offending command. I can't just kill them all because one of them is running an important command.
 
Old 06-18-2007, 02:05 PM   #4
desibeli
LQ Newbie
 
Registered: Aug 2005
Posts: 14

Rep: Reputation: 0
I tried:

In one shell, "while true; do sleep 100000; done"

in another, "ps -ef":

kws 24642 24637 0 10:38 pts/3 00:00:00 -bash
root 25654 16727 0 11:57 ? 00:00:00 sshd: kws [priv]
kws 25658 25654 0 11:57 ? 00:00:00 sshd: kws@pts/4
kws 25665 25658 0 11:57 pts/4 00:00:00 -bash
kws 25711 24642 0 11:58 pts/3 00:00:00 sleep 100000
kws 25712 25665 0 11:58 pts/4 00:00:00 ps -ef

Killed 24642, the shell died and the sleep went away. If it still doesn't work for you try posting your "ps -ef".
 
  


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
kill <pid> does not do anything moskito01 Linux - General 9 08-25-2009 12:20 PM
kill pid ekdya Debian 3 04-18-2006 05:04 PM
kill pid.... won't work with 'pid' variable given.. sachitha Programming 6 03-06-2006 07:48 PM
when kill -9 PID wont work bleunuit Linux - Software 2 08-06-2004 11:46 AM
question about kill(pid, sig) THETEZ Programming 3 04-18-2004 05:37 AM


All times are GMT -5. The time now is 02:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration