From owner-freebsd-questions@FreeBSD.ORG Tue Apr 20 12:59:37 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368FC1065670 for ; Tue, 20 Apr 2010 12:59:37 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by mx1.freebsd.org (Postfix) with ESMTP id 2378E8FC16 for ; Tue, 20 Apr 2010 12:59:36 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id 8ECF8213D; Tue, 20 Apr 2010 05:59:36 -0700 (PDT) From: merlyn@stonehenge.com (Randal L. Schwartz) To: mcoyles@horbury.wakefield.sch.uk References: <002c01cae05e$7eab3ea0$7c01bbe0$@wakefield.sch.uk> x-mayan-date: Long count = 12.19.17.5.4; tzolkin = 3 Kan; haab = 17 Pop Date: Tue, 20 Apr 2010 05:59:36 -0700 In-Reply-To: <002c01cae05e$7eab3ea0$7c01bbe0$@wakefield.sch.uk> (mcoyles@horbury.wakefield.sch.uk's message of "Tue, 20 Apr 2010 08:52:58 +0100") Message-ID: <86mxwy1dqf.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: Kill via Cron... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2010 12:59:37 -0000 >>>>> "mcoyles" == mcoyles 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 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion