From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: delete-process bug Date: Thu, 25 May 2006 17:26:09 +0200 Message-ID: <85zmh6w2ge.fsf@lola.goethe.zz> References: <87k69eyddj.fsf@lrde.org> <87fyj0r41g.fsf@lrde.org> <20060524112846.GA12046@agmartin.aq.upm.es> <87bqtmjrsh.fsf_-_@lrde.org> <87wtca6sna.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1148570825 19109 80.91.229.2 (25 May 2006 15:27:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 May 2006 15:27:05 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 25 17:27:04 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FjHjd-0001E5-6S for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 17:26:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjHjc-00071H-Ld for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 11:26:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjHjS-00071B-86 for emacs-devel@gnu.org; Thu, 25 May 2006 11:26:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjHjQ-00070v-TX for emacs-devel@gnu.org; Thu, 25 May 2006 11:26:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjHjQ-00070s-OK for emacs-devel@gnu.org; Thu, 25 May 2006 11:26:36 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjHo7-0003b6-Oi for emacs-devel@gnu.org; Thu, 25 May 2006 11:31:27 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FjHjQ-0005HG-1d; Thu, 25 May 2006 11:26:36 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 17C4A1C4D3B3; Thu, 25 May 2006 17:26:10 +0200 (CEST) Original-To: michael.cadilhac@lrde.org (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) In-Reply-To: <87wtca6sna.fsf@lrde.org> (=?iso-8859-1?Q?Micha=EBl?= Cadilhac's message of "Thu, 25 May 2006 17:17:13 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55283 Archived-At: michael.cadilhac@lrde.org (Micha=EBl Cadilhac) writes: > Stefan Monnier writes: > >>> This is not really due to my patch. However, it shows a real race >>> condition in process management of Emacs: >> [...] >>> After an hour of debugging, I can propose a small change that fixes >>> this bug and lets no room for any other race condition of that kind, >>> AFAICT. >> [...] >>> + * process.c (Fdelete_process): Wait for process termination to >>> + avoid `sigchld_handler' to consider the process to be synchronous. >> >> I don't think it's a good idea. The process might not die in response to >> delete-process, so we would end up waiting "indefinitely". > > Well, I copied the behavior of call_process, and tried to minimize > the patch. However, I'm interested in knowing when a process > doesn't answer a SIGKILL? I thought it was a non-ignorable signal. That merely means that the process will never run again. It puts it into "zombie" state. It will not get removed until the scheduler gets around to start the cleanup, and then the cleanup still has to finish (all files and sockets have to be closed). When devices are stuck, this can take arbitrarily long. --=20 David Kastrup, Kriemhildstr. 15, 44793 Bochum