Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

kill -9

Status
Not open for further replies.

dshaw21369

Programmer
Jul 8, 2002
64
0
0
is the kill -9 dangerous to use? If so why?
 
the normal kill is more polite and thorough, tiding up child processes and such. the kill -9 is more abrupt and messy. I tried to remain child-like, all I acheived was childish.
 
kill -9 is a sure way to kill as this signal cannot be trapped so is a sure way to kill a processes.

A SIG_TERM(15) would be a better approach as you can call your cleanup routines before exiting, but only if you have handled it other wise the default behavior is to terminate as abruptly as SIG_KILL(9).


 
In my environment, AIX, I use `kill -1`, and if that doesn't work a `kill -6`. My last use is a `kill -9` because it won't clean up the process table since the process wasn't killed gracefully allowing cleanup to occur.
 
It migt this can help you to understand about signals, thereis a little problem that is in spanish, I hope that you can undertans it.


Señal Valor Acción Comentario
----------------------------------------------------------------------
SIGHUP 1 A Cuelgue detectado en la terminal de
control o muerte del proceso de control
SIGINT 2 A Interrupción procedente del teclado
SIGQUIT 3 C Terminación procedente del teclado
SIGILL 4 C Instrucción ilegal
SIGABRT 6 C Señal de aborto procedente de abort(3)
SIGFPE 8 C Excepción de coma flotante
SIGKILL 9 AEF Señal de matar
SIGSEGV 11 C Referencia inválida a memoria
SIGPIPE 13 A Tubería rota: escritura sin lectores
SIGALRM 14 A Señal de alarma de alarm(2)
SIGTERM 15 A Señal de terminación
SIGUSR1 30,10,16 A Señal definida por usuario 1
SIGUSR2 31,12,17 A Señal definida por usuario 2
SIGCHLD 20,17,18 B Proceso hijo terminado o parado
SIGCONT 19,18,25 Continuar si estaba parado
SIGSTOP 17,19,23 DEF Parar proceso
SIGTSTP 18,20,24 D Parada escrita en la tty
SIGTTIN 21,21,26 D E. de la tty para un proc. de fondo
SIGTTOU 22,22,27 D S. a la tty para un proc. de fondo

A La acción por omisión es terminar el proceso.

B La acción por omisión es no hacer caso de la señal.

C La acción por omisión es terminar el proceso y hacer un volcado
de memoria.

D La acción por omisión es parar el proceso.

E La señal no puede ser capturada.

F La señal no puede ser pasada por alto.
 
the "hope" is overrated - pls do your postings in English. vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
&quot;[tt]kill -9[/tt]&quot; is the icepick in the forehead method of process termination.

For more info, check the man pages for kill, signal, and find the file signal.h.
 

Sorry, I haven't seen the conditions of use where it says &quot;post in english&quot;.

If you don't want to learn other languages, that is your loss. If you don't understand, skip the text and say to you self &quot;I need to learn other languages&quot;.

Cheers Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top