Killing the correct process
Geoff Clare
gwc at root.co.uk
Mon Mar 12 23:36:06 AEST 1990
In article <5724 at star.cs.vu.nl> maart at 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? <Pink Floyd - The Wall> 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 at root.co.uk (Dumb mailers: ...!uunet!root.co.uk!gwc) Tel: +44-1-315-6600
(from 6th May 1990): +44-71-315-6600
More information about the Comp.unix.questions
mailing list