This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: Why is everyone recommending kill -9? From: Cameron Simpson <cameron@research.canon.com.au> Date: Thu, 14 Oct 1999 14:02:52 +1000 On Sun, Oct 10, 1999 at 08:10:58PM -0700, Todd A. Jacobs wrote: | I see a *lot* of traffic relating to the kill command, and note that a lot | of people are steering the newbies towards kill -9. This is a *bad* habit | to get into. Yep. It's because they know no better. | The whole point of kill -9 (the SIGKILL signal) is to prevent a program | that has run amok from trapping the signal. SIGKILL prevents programs from | cleaning up after themselves, and really should only be used as a last | resort. | | Try 'kill <process>' first, which sends the SIGTERM signal. Yep. | If that | doesn't work, try 'kill -QUIT <process>' which is slightly more forceful, | but still gives a program one last chance to die cleanly. No. SIGQUIT is to get a core dump. Most programs should _not_ trap it, because you want to know _exactly_ where it was when you nailed it. Programs which catch SIGQUIT are BROKEN (or security critical - a minority). It's a debugging aid. If an ordinary program catches QUIT and tidies up, discard it:-) Use SIGHUP (though anyone with the foresight to catch SIGHUP will probably also catch SIGTERM). | Then, and only | then, should 'kill -KILL <process>' be sent. Indeed. === Subject: Re: Why is everyone recommending kill -9? From: "Todd A. Jacobs" <tajacobs@nvbell.net> Date: Wed, 13 Oct 1999 22:31:08 -0700 (PDT) On Thu, 14 Oct 1999, Cameron Simpson wrote: > Programs which catch SIGQUIT are BROKEN (or security critical - a > minority). It's a debugging aid. If an ordinary program catches QUIT > and tidies up, discard it:-) Heh. That would include Netscape, then. I often get race conditions in Netscape that will respond to a SIGQUIT, but not a SIGTERM. ===