LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-26-2004, 02:29 PM   #1
moskito01
LQ Newbie
 
Registered: Jun 2004
Posts: 22

Rep: Reputation: 15
kill <pid> does not do anything


Hi,

I tried to kill a process that did not respond by issuing
kill <pid>
but the process is still there...

I thought kill can kill every Process?
Or what am I doing wrong...

Frank
 
Old 06-26-2004, 03:03 PM   #2
pgreenwood
LQ Newbie
 
Registered: Nov 2003
Location: Omaha, Nebraska USA
Distribution: Debian and derivatives; dabbled in others
Posts: 26

Rep: Reputation: 1
Re: kill <pid> does not do anything

Quote:
Originally posted by moskito01
I thought kill can kill every Process?
Or what am I doing wrong...

Try ~$ man kill

for example

...For a process to have permission to send a signal to a process designated
by pid, the real or effective user ID of the receiving process must match
that of the sending process or the user must have appropriate privileges
(such as given by a set-user-ID program or the user is the superuser)....

hth

Pat
 
Old 06-26-2004, 03:07 PM   #3
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
That in simpler terms would mean that a user does not have permission to kill a process being run by root. Only root can do that.
 
Old 06-26-2004, 04:38 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Also, some processes are so screwed up that they will ignore a soft kill command. Running 'kill <pid>' asks the process to wrap up loose ends and tidy up then die. If the process is hung it may not listen. Try a 'kill -9 <pid>' which will kill it outright with no cleanup. Sometimes it is the only way to kill a hung/misbehaving process.
 
Old 06-28-2004, 01:46 PM   #5
moskito01
LQ Newbie
 
Registered: Jun 2004
Posts: 22

Original Poster
Rep: Reputation: 15
Thanx, thats it

Thank you all.
I already knew that sufficient permissions are required to kill a process.
But I did not know the -9 Stuff.
Using kill -9 <pid> worked perfectly.

Frank
 
Old 06-28-2004, 01:50 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
In my experience, if a process is out of control enough to require killing, the only thing that's going to snuff it out is a kill -9 anyway.
 
Old 08-23-2009, 10:54 PM   #7
coolnezz
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
Kill -9 <PID> did it for me! (hung up "apt-get update" process)
thanks.
 
Old 08-23-2009, 11:10 PM   #8
manwithaplan
Member
 
Registered: Nov 2008
Location: ~/
Distribution: Arch || Sidux
Posts: 393

Rep: Reputation: 45
Just as a side note... a utility I use that I find useful is HTOP. It gives a visual look @ all running pid's etc...
 
Old 08-23-2009, 11:48 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by manwithaplan View Post
Just as a side note... a utility I use that I find useful is HTOP. It gives a visual look @ all running pid's etc...
Not only that, but it's quite handy to kill those mad processes. Press 'k', then select the signal you want to send to the process in the list that will appear to the left. In most cases, you will want either the default 15 (SIGTERM) or 9, as in the kill command above (SIGKILL).
 
Old 08-25-2009, 12:20 PM   #10
coolnezz
LQ Newbie
 
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0
just installed HTOP... nice!
 
  


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
PID Kill Script or command ? Webmin rapture_1 Linux - General 1 11-02-2005 11:11 AM
when kill -9 PID wont work bleunuit Linux - Software 2 08-06-2004 11:46 AM
/var/run/[XXX].pid - Tcl pid code liguorir Linux - Software 1 05-20-2004 10:32 PM
small bash script to kill a PID flosch Linux - General 3 05-06-2004 09:28 PM
question about kill(pid, sig) THETEZ Programming 3 04-18-2004 05:37 AM

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

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