Kbase P5820: Guidelines on the use of UNIX kill command to stop a process
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/27/2004 |
|
Status: Unverified
GOAL:
How to use the UNIX kill command appropriately
GOAL:
Guidelines on the use of UNIX kill command to stop a process <PID>
GOAL:
How to use kill command to release shared memory
GOAL:
How to use the kill command to cancel processes
FACT(s) (Environment):
UNIX
FIX:
Use the following options when you use the UNIX kill command to cancel a defunct process or to release shared memory. Issue these kills in the following order until you successfully kill the process:
To obtain the user's pid type:
ps -ef
kill -1 <pid>
-> (SIGHUP) terminal hang up signal
kill -2 <pid>
-> (SIGINT) same as doing a Ctrl+C, terminal interrupt;
kill -15 <pid>
-> (SIGTERM) default if unspecified is a software termination likely to release the lock and shared memory being held. If the process is using cpu time, a kill -15 will generate a core file. A debugger will then be used to generate a stacktrace of the process. Progress Solutions 3167 and P6238 describe how to use debuggers that are most commonly found on UNIX systems.
kill -8 <pid>
-> (SIGQUIT) won't free the lock but produces a memory dump named core in the directory in which the session was started.
kill -9 <pid>
-> (SIGKILL) which truly kills the process and requires the release of held semaphores and shared memory segments for both the user sessions and the broker process (refer to Progress Solution P13793 to check on active message queues, memory, and semaphores).