From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: busyloop in sigchld_handler Date: Mon, 12 Mar 2007 13:53:25 -0400 Message-ID: <45F59395.4010708@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1173724224 7273 80.91.229.12 (12 Mar 2007 18:30:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2007 18:30:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 12 19:30:13 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 1HQpHg-0004pG-LZ for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2007 19:30:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQpIN-00022H-0m for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2007 13:30:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQpIC-000224-6V for emacs-devel@gnu.org; Mon, 12 Mar 2007 14:30:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQpI6-00020P-A6 for emacs-devel@gnu.org; Mon, 12 Mar 2007 14:30:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQpI6-00020J-1G for emacs-devel@gnu.org; Mon, 12 Mar 2007 13:30:38 -0500 Original-Received: from www.janestcapital.com ([66.155.124.107] helo=smtp.janestcapital.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HQpHO-0002cG-Mz for emacs-devel@gnu.org; Mon, 12 Mar 2007 14:29:55 -0400 Original-Received: from [192.168.250.217] [209.213.205.130] by janestcapital.com with ESMTP (SMTPD-9.10) id A39505BC; Mon, 12 Mar 2007 13:53:25 -0400 User-Agent: Thunderbird 1.5.0.8 (X11/20061107) In-Reply-To: X-detected-kernel: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 2186 seconds by postgrey-1.27 at monty-python; Mon, 12 Mar 2007 14:29:53 EDT 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:67802 Archived-At: Andreas Schwab wrote: > Sam Steingold writes: > >> wait3 is a system call, which, when invoked in a loop, prevents the >> kernel from doing anything else (in this case, sending SIGCHLD to >> emacs). sleep allows the kernel some time to pass the signal. > > I don't find this explanation convincing at all. Since the system call is > made _inside_ the signal handler, the signal is actually blocked here, so > it cannot be delivered anyway. yes, you are right. what I should have said was that by making a system call in a busyloop, emacs prevents the kernel from doing what it needs to do to the the child so that wait3 will succeed. Sam.