Kill via Cron...

Randal L. Schwartz merlyn at
Tue Apr 20 12:59:37 UTC 2010

>>>>> "mcoyles" == mcoyles  <mcoyles at> 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 at> <URL:>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See for Smalltalk and Seaside discussion

More information about the freebsd-questions mailing list