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: Sun, 11 Mar 2007 21:42:27 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Sam Steingold <address@hidden> writes:

>> * David Kastrup <address@hidden> [2007-03-11 20:43:13 +0100]:
>> address@hidden (Kim F. Storm) writes:
>>> Sam Steingold <address@hidden> 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.

I already tried that, and it didn't work !!!

I also tried a shorter sleep (usleep(100000)) before the first wait,
and it didn't work either -- emacs did remain respond briefly just
after M-x compile completed, but then it became unresponsive for ~10
seconds.

That's why I asked you to explain how the change is supposed to work.

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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