Article View: gnu.emacs.bug
Article #88042kill-process sends SIGKILL (9)?
From: Roger Crew
Date: Tue, 16 Aug 1994 22:49
Date: Tue, 16 Aug 1994 22:49
32 lines
2245 bytes
2245 bytes
The UNIX kill command (/usr/bin/kill on my box) sends SIGTERM (15) by default.
The builtin versions of kill in the various shells (csh, sh, bash, ...)
do likewise.
In Emacs, (kill-process foo) sends SIGKILL (9).
Now perhaps all of the shells authors collectively made a mistake, but
my understanding of this is one simply shouldn't be using SIGKILL when
SIGTERM will do the job, given that, by default, it's better to give a
process a chance to clean up after itself if it needs to and that only
if it abuses (or is inclined to abuse) this privilege do you hit it
with a SIGKILL...
Proposal 1:
(*) change kill-process to send SIGTERM
(*) change delete-process to send SIGKILL directly
(i.e., rather than call Fkill_process)
Proposal 2:
(*) introduce terminate-process (sends SIGTERM),
(*) change the documentation of kill-process to encourage
people to use terminate-process instead.
(*) change kill-process calls to terminate-process calls
where possible (the current lisp distribution only has
about 4 or 5 such calls)
Proposal 1 seems to me the Right Thing, given my conjecture (though
maybe this calls for a user poll) that in the vast majority of cases,
kill-process is used for polite termination and delete-process is
used when one wants to terminate-with-extreme-prejuidice-and-forget.
Proposal 2 is, admittedly, guaranteed not to break any existing code.
Technical Details
Message-ID:
<9408162248.AA07639@palnu.research.microsoft.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!CS.Arizona.EDU!math.arizona.edu!news.Arizona.EDU!news.Cerritos.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!research.microsoft.com!rfcReferences:
rfc@research.microsoft.com (Roger Crew)Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,cf9df32889891646,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-16 17:38:31 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!CS.Arizona.EDU!math.arizona.edu!news.Arizona.EDU!news.Cerritos.edu!nic-nac.CSU.net!usc!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!research.microsoft.com!rfc From: rfc@research.microsoft.com (Roger Crew) Newsgroups: gnu.emacs.bug Subject: kill-process sends SIGKILL (9)? Date: 16 Aug 1994 18:49:59 -0400 Organization: GNUs Not Usenet Lines: 33 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408162248.AA07639@palnu.research.microsoft.com> References: rfc@research.microsoft.com (Roger Crew)