kill vs. kill -9

kill vs. kill -9

Post by jack_1.. » Tue, 04 Jan 2000 04:00:00



hi,

What is the difference between "kill" and "kill -9". In simple language.

Thanks,..

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

kill vs. kill -9

Post by Chris Costell » Tue, 04 Jan 2000 04:00:00



> What is the difference between "kill" and "kill -9". In simple language.

   kill will ask the process to die.

   kill -9 will go off and shoot it.



 
 
 

kill vs. kill -9

Post by Manfred Bart » Tue, 04 Jan 2000 04:00:00



> What is the difference between "kill" and "kill -9". In simple language.

``kill <pid>'' sends a SIGTERM to the process.

``kill -9 <pid>'' sends a specific signal to the process.  

The use of signal numbers is a bit dubious because AFAIK there is
nothing that will *guarantee* that all signals are numbered
identically on different systems.  On Linux and on Solaris, signal 9
is ``SIGKILL'' which is unblockable by the receiving process and
causes immediate termination, e.g. the process has no chance to clean
up and may leave things like lockfiles behind which you then have to
clean up manually.  A better way of issuing this command would be:
``kill -KILL <pid>''

Another thing to watch out for is that ``kill'' can be a built-in
shell command and it also is a program, e.g. ``/usr/bin/kill''.  The
functionality may differ somewhat.

man kill
man signal

--
Manfred Bartz

 
 
 

kill vs. kill -9

Post by C.Madhusuda » Tue, 04 Jan 2000 04:00:00



> hi,

> What is the difference between "kill" and "kill -9". In simple language.

> Thanks,..

> Sent via Deja.com http://www.deja.com/
> Before you buy.

kill sends a default signal to the process. kill -9 sends SIGKILL which
cannot be trapped. so its a sure kill. By default the other signals kill
-1 etc can be trapped
--
C.Madhusudan
HCL Technologies ltd
CISCO ODC
49-50 Nelson Manickam road
Chennai - 600029
Ph   ::+91-44-3741939
FAX  ::+91-44-3741038
 
 
 

kill vs. kill -9

Post by Geoff Clar » Fri, 07 Jan 2000 04:00:00



>The use of signal numbers is a bit dubious because AFAIK there is
>nothing that will *guarantee* that all signals are numbered
>identically on different systems.

It is pretty safe to use signal numbers 1, 2, 3, 6, 9, 14 and 15 with
kill commands.  POSIX.2 requires kill to generate HUP, INT, QUIT, ABRT,
KILL, ALRM and TERM signals, respectively, for these numbers even if the
numeric values in <signal.h> are different.  Older systems that are not
POSIX.2 compliant would most likely have used these numbers anyway.
--


 
 
 

1. A method to kill process that cannot be killed even with `kill -9'.

Try this method:
kill -9 non-killed-pid
/usr/proc/bin/prun non-killed-pid
/usr/proc/bin/pmap non-killed-pid
This method works perfectly with Solaris 6. Sometimes you can do it
without the "kill -9 non-killed-pid"

P.S. I don't know about other versions and about some hardware programs,
like tar.

--
------------------------------------------------------
Eugene S. Ilchenko, System Network Administrator
http://secinf.net/

2. Win Netscape Incompatibility with scohttpd?

3. killing dead process, kill -9 doesn′t work

4. If I want a null popen(), what should I use?

5. how to kill a process when kill -9 won't

6. Oraperl

7. kill -9 doesn't kill (continued)

8. Apache 1.3.6 Solaris wedges (NFS LockFile?)

9. Kill -9 won't kill a process

10. Cant kill using kill -9

11. mount not killed with "kill -9"

12. more about kill and kill -9

13. kill -9 doesn't kill a process!