Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 2010 05:59:36 -0700
From:      merlyn@stonehenge.com (Randal L. Schwartz)
To:        mcoyles@horbury.wakefield.sch.uk
Cc:        questions@freebsd.org
Subject:   Re: Kill via Cron...
Message-ID:  <86mxwy1dqf.fsf@red.stonehenge.com>
In-Reply-To: <002c01cae05e$7eab3ea0$7c01bbe0$@wakefield.sch.uk> (mcoyles@horbury.wakefield.sch.uk's message of "Tue, 20 Apr 2010 08:52:58 %2B0100")
References:  <002c01cae05e$7eab3ea0$7c01bbe0$@wakefield.sch.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "mcoyles" == mcoyles  <mcoyles@horbury.wakefield.sch.uk> writes:

mcoyles> kill -9 

[from a post I made frequently in comp.unix.questions...]

No no no.  Don't use kill -9.

It doesn't give the process a chance to cleanly:

1) release IPC resources (shared memory, semaphores, message queues)

2) clean up temp files

3) inform its children that it is going away

4) reset its terminal characteristics

and so on and so on and so on.

Generally, send 15 (SIGTERM), and wait a second or two, and if that
doesn't work, send 2 (SIGINT), and if that doesn't work, send 1
(SIGHUP).  If that doesn't, REMOVE THE BINARY because the program is
badly behaved!

Don't use kill -9.  Don't bring out the combine harvester just to tidy
up the flower pot.


-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>;
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86mxwy1dqf.fsf>