Re: bash should retry a fork() returning EAGAIN

2007-09-18 Thread Matthew Woehlke

Martin Koeppe wrote:
I'm using bash 3.1 on interix. There fork() may fail with EAGAIN if e.g. 
several builds (configures) are running in parallel. Unfortunately, 
fork() isn't retried and configure stops.


So I suggest adding this patch to bash which retries fork() when it 
fails with EAGAIN.  Idea is from pdksh.  At least 3.2 doesn't have such 
a patch, I didn't look though all the patches after 3.2, however.


Might be worth checking with the Cygwin folks, but this sounds like it 
would be useful in Cygwin also. (IIRC, this problem is why I dropped SUA 
for Cygwin in the first place, i.e. in SUA the problem was much worse.)


Eric, are you watching this? :-)

--
Matthew
"Non sequitor. Your facts are out of order." -- Nomad





Re: bash should retry a fork() returning EAGAIN

2007-09-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Matthew Woehlke on 9/18/2007 4:39 PM:
> Martin Koeppe wrote:
>> I'm using bash 3.1 on interix. There fork() may fail with EAGAIN if
>> e.g. several builds (configures) are running in parallel.
>> Unfortunately, fork() isn't retried and configure stops.
>>
>> So I suggest adding this patch to bash which retries fork() when it
>> fails with EAGAIN.  Idea is from pdksh.  At least 3.2 doesn't have
>> such a patch, I didn't look though all the patches after 3.2, however.
> 
> Might be worth checking with the Cygwin folks, but this sounds like it
> would be useful in Cygwin also. (IIRC, this problem is why I dropped SUA
> for Cygwin in the first place, i.e. in SUA the problem was much worse.)
> 
> Eric, are you watching this? :-)

It does look like an interesting patch, so I might play with it some more
in the cygwin port of bash.  In the meantime, cygwin CVS has added an
automatic retry parameter to the CYGWIN variable, that is supposed to help
reduce the number of EAGAIN failures in the first place.

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8Gyu84KuGfSFAYARAua0AJsHxxwIOCvsoIzIzLIxh3xngE9/MgCeP8cL
mTUKxXkCDb6bu8C9VLS51d0=
=QHNn
-END PGP SIGNATURE-