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: Sun, 11 Mar 2007 15:51:56 -0400 Organization: disorganization Message-ID: References: <85fy8bpnvy.fsf@lola.goethe.zz> Reply-To: sds@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1173642840 6460 80.91.229.12 (11 Mar 2007 19:54:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 19:54:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 11 20:53:53 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 1HQU76-0007to-Bw for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 20:53:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQU7f-00034J-S7 for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 14:54:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQU7V-00034D-Ns for emacs-devel@gnu.org; Sun, 11 Mar 2007 15:54:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQU7V-000341-Be for emacs-devel@gnu.org; Sun, 11 Mar 2007 15:54:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQU7V-00033y-5b for emacs-devel@gnu.org; Sun, 11 Mar 2007 14:54:17 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HQU6u-0007Og-Ny for emacs-devel@gnu.org; Sun, 11 Mar 2007 15:53:41 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HQU6C-0002vS-4B for emacs-devel@gnu.org; Sun, 11 Mar 2007 20:52:56 +0100 Original-Received: from ool-182f780f.dyn.optonline.net ([24.47.120.15]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Mar 2007 20:52:56 +0100 Original-Received: from sds by ool-182f780f.dyn.optonline.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Mar 2007 20:52:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ool-182f780f.dyn.optonline.net Mail-Copies-To: never X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:Bq6AxslO2+Y6SPug4xc0Wd7WUj0= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:67726 Archived-At: > * David Kastrup [2007-03-11 20:43:13 +0100]: > storm@cua.dk (Kim F. Storm) writes: >> Sam Steingold writes: >> > > Wouldn't it make more sense to do > > for (;;) { > errno = 0; > pid = wait3(&w, WNOHANG | WUNTRACD, 0); > if (!(pid < 0 && errno == EINTR)) > break; > sleep(1); > } > > That way, we don't get an obligatory sleep if things happen to work > without it. yes - my point was to make the change as small as possible to make it clear what I want (and minimize opposition). it appears that people do not mind, so I will modify it along your lines. -- Sam Steingold (http://sds.podval.org/) on Fedora Core release 6 (Zod) http://honestreporting.com http://palestinefacts.org http://openvotingconsortium.org http://israelunderattack.slide.com Liberty is measured in meters: how far one can travel without showing an ID.