Ah très bonne remarque... je fais partie de cette tribu (bon, non, en fait je fais plutôt un killall ^_^). D'après le man, kill envoie SIGTERM, kill -9 envoie SIGKILL. Dans quel cas l'action va être différente ?
<googling...>
D'après http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ba(...) (bon, c'est pour FreeBSD, mais je suppose que la gestion Linux est la même)...
Two signals can be used to stop a process, SIGTERM and SIGKILL. SIGTERM is the polite way to kill a process; the process can catch the signal, realize that you want it to shut down, close any log files it may have open, and generally finish whatever it is doing at the time before shutting down. In some cases a process may even ignore SIGTERM if it is in the middle of some task that can not be interrupted.
Donc effectivement, kill tout court est plus clean.
Merci, je me coucherai moins bête ce soir !
[^] # Re: kill
Posté par liberforce (site web personnel, Mastodon) . En réponse au journal Overkill. Évalué à 3.
<googling...>
D'après http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ba(...) (bon, c'est pour FreeBSD, mais je suppose que la gestion Linux est la même)...
Donc effectivement, kill tout court est plus clean.
Merci, je me coucherai moins bête ce soir !
signé: un ex-newbie du signal :)