emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: busyloop in sigchld_handler


From: Kim F. Storm
Subject: Re: busyloop in sigchld_handler
Date: Wed, 28 Mar 2007 12:02:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

Sam Steingold <address@hidden> writes:

>> * YAMAMOTO Mitsuharu <address@hidden> [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 <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]