From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: busyloop in sigchld_handler Date: Wed, 28 Mar 2007 12:02:02 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175076189 14277 80.91.229.12 (28 Mar 2007 10:03:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Mar 2007 10:03:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 28 12:03:02 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 1HWUzd-0000PS-4d for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2007 12:03:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWV24-0005T4-Mp for ged-emacs-devel@m.gmane.org; Wed, 28 Mar 2007 05:05:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWV1y-0005Nl-It for emacs-devel@gnu.org; Wed, 28 Mar 2007 06:05:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWV1w-0005Lk-US for emacs-devel@gnu.org; Wed, 28 Mar 2007 06:05:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWV1w-0005LK-QS for emacs-devel@gnu.org; Wed, 28 Mar 2007 05:05:24 -0500 Original-Received: from pfepb.post.tele.dk ([195.41.46.236]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HWUzT-0002Tw-Ra for emacs-devel@gnu.org; Wed, 28 Mar 2007 06:02:52 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepb.post.tele.dk (Postfix) with SMTP id B9510A50066 for ; Wed, 28 Mar 2007 12:02:49 +0200 (CEST) In-Reply-To: (Sam Steingold's message of "Sun\, 25 Mar 2007 22\:02\:44 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) 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:68704 Archived-At: Sam Steingold writes: >> * YAMAMOTO Mitsuharu [2007-03-26 10:47:41 +0900]: >> >> The following change (without a ChangeLog entry) made operations using >> subprocesses really sluggish on Mac OS X. Is it possible to restrict >> the workaround to the relevant platforms? > > sorry - this patch merely reverted another one (which did not merit a > ChangeLog entry either :-) > > how about this? > one millisecond is enough to fix my problem - does it fix yours? > > --- process.c 24 Mar 2007 23:02:12 -0400 1.506 > +++ process.c 25 Mar 2007 21:54:24 -0400 > @@ -6507,7 +6507,7 @@ > loadavg to 5-8(!) for ~10 seconds. > See http://thread.gmane.org/gmane.emacs.devel/67722 or > http://www.google.com/search?q=busyloop+in+sigchld_handler */ > - sleep (1); > + usleep (1000); > errno = 0; > pid = wait3 (&w, WNOHANG | WUNTRACED, 0); > } > Do all platforms have usleep ? Otherwise, we need a check in configure and use #ifdef HAVE_USLEEP usleep(1000); #endif -- Kim F. Storm http://www.cua.dk