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: Thu, 25 May 2006 15:40:05 -0400 Message-ID: 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=us-ascii X-Trace: sea.gmane.org 1148586088 10617 80.91.229.2 (25 May 2006 19:41:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 25 May 2006 19:41:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 25 21:41:25 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 1FjLhn-0007iS-Dp for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 21:41:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjLhm-0000y3-US for ged-emacs-devel@m.gmane.org; Thu, 25 May 2006 15:41:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjLgq-0000es-Jh for emacs-devel@gnu.org; Thu, 25 May 2006 15:40:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjLgo-0000e3-HF for emacs-devel@gnu.org; Thu, 25 May 2006 15:40:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjLgo-0000e0-8f for emacs-devel@gnu.org; Thu, 25 May 2006 15:40:10 -0400 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjLlX-0001tC-6m for emacs-devel@gnu.org; Thu, 25 May 2006 15:45:03 -0400 Original-Received: from localhost ([70.55.141.245]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060525194007.CLDT18394.tomts5-srv.bellnexxia.net@localhost>; Thu, 25 May 2006 15:40:07 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 889698258; Thu, 25 May 2006 15:40:05 -0400 (EDT) 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:55290 Archived-At: >> I think in order to avoid such race-conditions without waiting for the >> process's death, we'll need to remember those processes that were deleted >> but aren't dead yet. Of course, it goes against the docstring of >> `delete-process' which says "forget about it immediately". But we don't >> need to keep the whole process around; just the PID should be enough, kept >> in a list of "deleted but not dead" PIDs. See sample patch below. > Actually, I did try such a solution, but I wasn't sure where the > elements of that list should be deleted (removed? ;-)) ; I'm not very > comfortable with making such things in a sighandler. Check my patch: in the sighandler I only zero-out the list-entry; the cons-cell itself will only be removed next time you call delete-process. Stefan