LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-12-2002, 11:50 PM   #1
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Rep: Reputation: 15
cannot kill a program


dns2go client messed up somehow so i had to quit it then restart it. i push ctrl+z to stop it then i push up to start the process again "waiting for process 1492 to end" and it said the process was paused so i assumed that i never killed the program. look in my trusty manual to see what the kill command is, here are the commands i tried:
kill -signal 1492 //says that it does not understand the signal command even though my book says the command exists
killall -g dns2go //closes 1 process but not the other 7
exit //cannot log out, 8 processes are stopped
quit //does nothing

i tried kill -l and killall -l but NEITHER listed the dns2go process so how the hell am i supposed to log out!?!?!? if i can't kill the process then wtf do i do?

Last edited by trickykid; 06-13-2002 at 01:10 AM.
 
Old 06-13-2002, 01:11 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
kill -9 pid will kill the program with no questions asked.

for more.. man kill
 
Old 06-13-2002, 01:20 AM   #3
Chooco
Member
 
Registered: May 2002
Location: Mexico
Distribution: Slackware
Posts: 118

Original Poster
Rep: Reputation: 15
i typed man kill though and it dosen't have that command anywhere in there. my Linux In A Nutshell book doesn't have that either.
 
Old 06-13-2002, 02:17 AM   #4
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Run 'man 7 signal' to find out what all the signals are. 9 is equivalent to a SIGKILL. If you don't like remembering numbers you can also use the signal name.

kill -KILL 1492
 
Old 06-13-2002, 04:35 AM   #5
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
The kill command is one of the bash builtins. Do a man bash and look for kill there. I guess mandrake decided to cut costs and not include a separate man page for kill.
 
Old 07-21-2003, 09:01 AM   #6
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
here is the HARD case

I actually got 3 zombies that don't want to go to h****, even at my sweetest invitations.

a kill -s 9 PID
does nothing, the just keep hanging around.

I so far got everything killed with sigkill, but now I am baffled. What can I do? Do I have to restart the system, like a stupid Windows OS? (Would not like that, I got linux)
Don't want to follow the stupid advice of some moron Windows Admin "A reboot is always good".
 
Old 07-21-2003, 09:25 AM   #7
Pres
Member
 
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
Quote:
Originally posted by linuxcool
The kill command is one of the bash builtins. Do a man bash and look for kill there. I guess mandrake decided to cut costs and not include a separate man page for kill.
Also sometimes a separate binary, your slack will have it, /bin/kill. Perhaps being specific /bin/kill -9 PID will work ?
 
Old 07-21-2003, 03:35 PM   #8
ranger12002
Member
 
Registered: Jun 2003
Location: miami florida
Distribution: slackware 9.0
Posts: 128

Rep: Reputation: 15
kill -9 pid is a forced kill(kills it whether it likes it or not)so it should work
 
Old 07-21-2003, 03:58 PM   #9
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Rep: Reputation: 32
Re: here is the HARD case

Quote:
Originally posted by browny_amiga

Don't want to follow the stupid advice of some moron Windows Admin "A reboot is always good".

you gotta hate that windows memory management huh...


a program is not allowed to create a default disposition for a SIGKILL signal (as opposed to a SIGTERM signal)...thus it cannot handle the SIGKILL itself and it will die.

man 2 signal should teach you more about the way the signal works (if you are a C programmer)

have fun.
 
Old 07-21-2003, 04:03 PM   #10
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Re: here is the HARD case

Quote:
Originally posted by browny_amiga
a kill -s 9 PID does nothing,
Uh.. you aren't typing in 'PID' are you. Substitute the process ID number.

ex.: kill -9 1234
 
Old 07-21-2003, 04:06 PM   #11
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
i noticed kill doesn't do all that much for me most of the times, but i just dont use it anymore..
i just issue the command:
killall -15
or if that don't work, we'll make it work
killall -9
 
Old 07-22-2003, 02:02 AM   #12
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
No, I am NOT, of course I am not using PID as PID number. I use the task number, the actual one. I got three tasks hanging around (state defunct), listed as zombies and all the bullets and sacred water does not do a damn.
I tried to kill them about 10 times already, and they won't leave. This is kind of getting tricky. I could do a reboot, but I am kind of curious how to solve this sucker.
Could I make them crash? Is there a way to do a segmentation fault on these programms? That they are removed by the system?
 
Old 07-22-2003, 09:50 AM   #13
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
here's an interesting thought that I found here.

"A zombie process sticks around until either its parent dies without it being assigned a new parent or until its parent checks its exit status (the 'performing an autopsy' the previous poster mentioned).

The metaphor extends a bit more, because you can't kill a zombie process the way you can kill normal processes - because you can't kill something that's already dead =)"

That link seems to be mostly a discussion of metaphors, but I think the idea of the parent process keeping the affected process in existence may be apropos here.


Also,
Quote:
No, I am NOT, of course I am not using PID as PID number.
OK, I thought so, but was just making sure.

Regards...
 
Old 07-22-2003, 10:07 AM   #14
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
Angry How to get rid of these #$#*&!!! Zombies?

Yes, zombies cannot be killed because they are undead (you can't overkill something, if it is dead and you shoot it again, it doesn't change)

The thing is just that I don't like this thing at all. I remember having killed zombie processes before, but this time it just won't work. I always (so far) thought and hoped that linux is consistent, meaning that with - SIGKILL you can get rid of everything. I heard from somebody that sometimes you can't and did not believe/like it, because it scratches my vision of linux as an OS with non of these windows anomalies.
so I have found it then.
Anybody reading this knows how I sent these zombies to hell? Anything will do, overwrite their memory space, make them misbehave more that the OS will kick them out? Can I make them crash, remove them artificially from the process list, write some nasty stuff into /proc that will make the OS vomit them out?

I know I can reboot, but this is a challenge to me. There MUST BE A SOLUTION. In linux, there is always one. It is OPEN source, you can see inside, that's the thing.

Another thought: so, if I restart the system, it should hang with these processes, and not terminate, right? Since it cannot kill them with sigterm and sigkill, what else is there?
 
Old 07-23-2003, 03:15 AM   #15
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally posted by itsjustme
... I think the idea of the parent process keeping the affected process in existence may be apropos here.
Not that I would know how to do it, but can't you affect the parent process in a way to make it terminate the undead (e.g. trying to reanimate them and failing...)? Good hunting .
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how kill a program SciYro Linux - Newbie 5 07-11-2004 04:20 AM
how to kill a program in KDE ? juanb Linux - Newbie 8 11-20-2003 07:59 PM
How to kill my program? kewlchen Linux - General 7 08-12-2003 03:40 PM
How to kill program that has crashed? glock19 Linux - General 3 01-11-2002 01:49 PM
Kill a program tunedLow Linux - Newbie 3 10-27-2001 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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