sshd and SIGKILL

Gert Doering gert at greenie.muc.de
Tue Sep 10 15:51:19 EST 2002


Hi,

On Thu, Sep 05, 2002 at 08:55:55PM +0300, Roumen.Petrov at skalasoft.com wrote:
> On command:
> #kill -9 `cat /var/run/sshd.pid`
> sshd leave pid file !

Of course it does.  "kill -9" means "abort process *immediately*" - no
matter what you do, sshd has no means (!!) to clean up anything.

So don't use "kill -9", except if nothing else works.  Never.

Use "kill -15" (which is SIGTERM, instead of SIGKILL) - this gives the
process the chance to clean up.

> Missing line is :
> 		signal(SIGKILL, sigterm_handler);

Read up on unix signal semantics.

gert
-- 
Gert Doering
Mobile communications ... right now writing from *Ripe43 / Rhodos / Greece*



More information about the openssh-unix-dev mailing list