Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!ukc!stc!root44!gwc From: gwc@root.co.uk (Geoff Clare) Newsgroups: comp.unix.questions Subject: Re: Killing the correct process Message-ID: <1819@root44.co.uk> Date: 12 Mar 90 13:36:06 GMT References: <22332@adm.BRL.MIL> <5312@star.cs.vu.nl> <1212@root44.co.uk> <5352@star.cs.vu.nl> <1221@root44.co.uk> <5448@star.cs.vu.nl> <1381@root44.co.uk> <5669@star.cs.vu.nl> <1813@root44.co.uk> <5724@star.cs.vu.nl> Reply-To: gwc@root.co.uk (Geoff Clare) Organization: UniSoft Ltd, London, England Lines: 38 In article <5724@star.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: | |)SIGXCPU: is for limiting resource usage, and in any case is non-standard. | |So what? From `man init' on SunOS 4.0.3c: | | init catches the hangup signal (SIGHUP) and interprets it to | mean that the file /etc/ttytab should be read again. | |"Boo hiss! SIGHUP is for signaling a hangup on a terminal line!" Of course a program can choose to use any signal for it's own purposes. But that's not really relevant to the point under discussion, which was what signal should be used for terminating processes in general. The correct signal for this job is SIGTERM, because any well designed program will clean up and exit ASAP when it receives a SIGTERM. |)The phrase "time out" when applied to a process really means "terminate |)before normal completion". When you want to *TERM*inate a process you use |)SIG*TERM*. Need I say more? | |The phrase "time out" when applied to a process really means "kill |before normal completion". When you want to *KILL* a process you use |SIG*KILL*. Sic! Looks like we're going round in circles here. This was one of my original objections to your old method. SIGKILL should only be used as a last resort. Going straight for SIGKILL does not allow the process to clean up. "... we came in? Isn't this where ..." I think we're probably talking to ourselves here, Maarten. Everyone else put this subject in their KILL file ages ago. -- Geoff Clare, UniSoft Limited, Saunderson House, Hayne Street, London EC1A 9HH gwc@root.co.uk (Dumb mailers: ...!uunet!root.co.uk!gwc) Tel: +44-1-315-6600 (from 6th May 1990): +44-71-315-6600