aspose file tools*
The moose likes Linux / UNIX and the fly likes Kill Statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Kill Statement" Watch "Kill Statement" New topic
Author

Kill Statement

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
Pls How does one forcefully stop a process. I used kill 56766 but its still alive
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Try:


[ August 10, 2006: Message edited by: Scott Johnson ]
Syedz -X-
Greenhorn

Joined: Aug 13, 2006
Posts: 3
The -9 (or -KILL) argument to kill(1) should never be used on Unix systems, except as a very last resort. The KILL signal does not allow a process to run any cleanup code, which means blasting away with kill -9 may leave child processes of a parent orphaned, temporary files open, shared memory segments active, and sockets busy. This leaves the system in a messy state, and could lead to unanticipated and hard to debug problems.

#kill pid
this will only suspend the pid, menawhile kill -1 pid will restart the process

for better killing process, use this steps
$ kill pid
$ kill -INT pid
$ kill -HUP pid
$ kill -KILL pid

or if you know the application and want to kill entire pid of that particular application
$killall application_name
[ August 14, 2006: Message edited by: Syedz -X- ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

"Syedz -X-"

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jay Suttiruttana
Ranch Hand

Joined: Aug 17, 2006
Posts: 36
Here's an example from kill man page on SunOS 5.9

Example 1: Sending the kill signal

Any of the commands:

example% kill -9 100 -165
example% kill -s kill 100 -165
example% kill -s KILL 100 -165

sends the SIGKILL signal to the process whose process ID is
100 and to all processes whose process group ID is 165,
assuming the sending process has permission to send that
signal to the specified processes, and that they exist.


OPTIONS

-s signal_name
Specifies the signal to send, using one of the sym-
bolic names defined in the <signal.h>

You should check out this web site for more info about kill using option "-9" http://www.speculation.org/garrick/kill-9.html
[ August 31, 2006: Message edited by: Jay Suttiruttana ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Kill Statement