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: busyloop in sigchld_handler Date: Tue, 13 Mar 2007 23:54:22 +0100 Message-ID: <85tzwokb4x.fsf@lola.goethe.zz> References: <45F59395.4010708@gnu.org> <45F5A2B4.7090301@gnu.org> <85ejnumf1o.fsf@lola.goethe.zz> <868xe11tzu.fsf@lola.quinscape.zz> <85abyglrbs.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173826496 5213 80.91.229.12 (13 Mar 2007 22:54:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2007 22:54:56 +0000 (UTC) Cc: Sam Steingold , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 13 23:54:40 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HRFt6-0002BG-Tt for ged-emacs-devel@m.gmane.org; Tue, 13 Mar 2007 23:54:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRFtv-0008GQ-5v for ged-emacs-devel@m.gmane.org; Tue, 13 Mar 2007 17:55:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HRFtr-00088m-5V for emacs-devel@gnu.org; Tue, 13 Mar 2007 18:55:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HRFto-00081C-OI for emacs-devel@gnu.org; Tue, 13 Mar 2007 18:55:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRFto-000819-J2 for emacs-devel@gnu.org; Tue, 13 Mar 2007 17:55:20 -0500 Original-Received: from mail-in-12.arcor-online.net ([151.189.21.52]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HRFsv-0003wA-5W; Tue, 13 Mar 2007 18:54:25 -0400 Original-Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mail-in-12.arcor-online.net (Postfix) with ESMTP id 9DDFD4C408; Tue, 13 Mar 2007 23:54:23 +0100 (CET) Original-Received: from mail-in-13.arcor-online.net (mail-in-13.arcor-online.net [151.189.21.53]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id 934AAABAE0; Tue, 13 Mar 2007 23:54:23 +0100 (CET) Original-Received: from lola.goethe.zz (dslb-084-061-060-098.pools.arcor-ip.net [84.61.60.98]) by mail-in-13.arcor-online.net (Postfix) with ESMTP id 64554225124; Tue, 13 Mar 2007 23:54:23 +0100 (CET) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id E24E21C4F93F; Tue, 13 Mar 2007 23:54:22 +0100 (CET) In-Reply-To: (Andreas Schwab's message of "Tue\, 13 Mar 2007 23\:28\:13 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:67877 Archived-At: Andreas Schwab writes: > David Kastrup writes: > >> The one waiting for the demise of a process that gets no processing >> time for dying. > > If there is no children dying then the loop is exited immediately. Dying is not the same as dead. If I send a process a fatal signal, it is dying. But it is not dead before it has completed processing the signal. >> It is the only thing that can prevent a deadlock here. > > Which deadlock? The CPU is claimed by the process with the loop, so no other process may actually progress to a state which can be "wait"ed for. The deadlock is on the resource "CPU", and only preemption can break it. >> I can't see how this guarantees one signal per child. > > It's explicitly explained in the quoted text. I disagree. "explicitly" would mean that some wording remotely similar to your "guarantee" claims could be found. So at best, it is implicitly contained somewhere for a person smarter than myself. As that seemingly includes you, it would have been nice if you had bothered to explain. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum