From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: delete-process bug Date: Fri, 26 May 2006 09:10:33 -0400 Message-ID: References: <87k69eyddj.fsf@lrde.org> <87fyj0r41g.fsf@lrde.org> <20060524112846.GA12046@agmartin.aq.upm.es> <87bqtmjrsh.fsf_-_@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1148649078 5966 80.91.229.2 (26 May 2006 13:11:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 May 2006 13:11:18 +0000 (UTC) Cc: michael.cadilhac@lrde.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 26 15:11:12 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 1Fjc5g-0001xE-62 for ged-emacs-devel@m.gmane.org; Fri, 26 May 2006 15:10:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjc5f-0005Jp-Kv for ged-emacs-devel@m.gmane.org; Fri, 26 May 2006 09:10:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjc5U-0005Id-Bl for emacs-devel@gnu.org; Fri, 26 May 2006 09:10:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjc5T-0005Hw-P2 for emacs-devel@gnu.org; Fri, 26 May 2006 09:10:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjc5T-0005Hk-Kq for emacs-devel@gnu.org; Fri, 26 May 2006 09:10:43 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjcAM-0007hv-Ak; Fri, 26 May 2006 09:15:46 -0400 Original-Received: from localhost ([70.55.141.245]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060526131036.TGFB1543.tomts43-srv.bellnexxia.net@localhost>; Fri, 26 May 2006 09:10:36 -0400 Original-Received: by localhost (Postfix, from userid 20848) id ABD188258; Fri, 26 May 2006 09:10:33 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 25 May 2006 22:22:31 -0400") 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:55326 Archived-At: > Thanks for working on this. I agree that `live_deleted_processes' > is a good name. ("Zombie process" has a different meaning.) > However, maybe there is still a race condition. Suppose the signal > comes in the middle of the line > + live_deleted_processes = Fcons (make_number (p->pid), > + /* GC previous elements. */ > + Fdelq (Qnil, live_deleted_processes)); > Suppose it comes between there and the call to remove_process? I think it's OK: if the signal handler comes before the assignment to live_deleted_processes, then it'll all behave as if the signal came even before the call to delete-process. If it comes afterwards, the signal will be ignored (as if it came after the call to delete-process). > Does the right thing happen in all these cases? I believe so. > Also, please remember that in Emacs braces go on lines by themselves: > + tail = Fmemq (make_number (pid), live_deleted_processes); > + if (!NILP (tail)) { > + Fsetcar (tail, Qnil); > + return; > + } I do remember, but indeed I missed this one. Thanks for spotting it. Stefan