*BSD News Article 15036


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!usc!cs.utexas.edu!uunet!mcsun!uknet!pipex!demon!centrix.demon.co.uk!damian
Newsgroups: comp.os.386bsd.development
From: damian@centrix.demon.co.uk (damian)
Subject: Re: SIGKILL and kill
References: <C5nsF8.35H@sugar.neosoft.com> <9304200033.af09432@gate.demon.co.uk> <1993Apr20.183620.301@intellistor.com>
Organization: Centrix
Keywords: SIGNALS SECURITY
Date: Thu, 22 Apr 1993 00:08:12 +0000
Message-ID: <9304221908.ac04464@gate.demon.co.uk>
Sender: usenet@demon.co.uk
Lines: 32

In article <1993Apr20.183620.301@intellistor.com> cwolff@intellistor.com (Clint Wolff) writes:
>In article <9304200033.af09432@gate.demon.co.uk> damian@centrix.demon.co.uk (damian) writes:
>>In article <C5nsF8.35H@sugar.neosoft.com> peter@NeoSoft.com (Peter da Silva) writes:
>>>In article <9304171535.ab08751@gate.demon.co.uk> damian@centrix.demon.co.uk (damian) writes:
>>>> have seen a SIGKILL will soon follow. In fact I have been trying to
>>>> work out why sh ignores SIGTERM when at the command prompt (it behaves
>>>> properly when running a script).
>>>
>>>So you can do "kill 0" to get rid of background processes without logging out.
>>
>>Ah so there is a reason. Still I think that is a little inconsistent. After
>>all SIGTERM should mean "Please *you* die, and cleanup" (as opposed to the
>>SIGKILL's "Die sucker! Now!" :-)). Still I suppose I can't think of a better
>>signal that sh could use for the kill 0.
>>
>
>Actually, this is to avoid the unfortunate happenstance of hitting ^C to kill
>a program, waiting for it to die, getting bored, hitting ^C again, waiting...
>etc.. etc.. etc.. until the machine actually decides to kill it... Then,
>all the extra ^C's are fed into the shell which ignores them (rightfully so..)

Erm hang on ^C normally generates SIGINT (2), not SIGTERM (15). Oh agree it
is quite acceptable for progs to ignore SIGINT. I am complaining about code
that ignores SIGTERM.

Damian
-- 
+----------------------------+------------------------------------------------+
| Damian Ivereigh            | If you can't suss out what this is replying to |
| damian@centrix.demon.co.uk | get a threaded news reader, like trn. :-)      |
| Twickenham, U.K.           | This is the best way to cut wasted traffic     |
+----------------------------+------------------------------------------------+