This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Resource Temporarily Unavailable workaround
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 22 Nov 2007 12:05:18 -0500
- Subject: Re: Resource Temporarily Unavailable workaround
- References: <4745B152.3070704@st.com> <20071122170051.GA29996@ednor.casa.cgf.cx>
- Reply-to: cygwin-patches at cygwin dot com
On Thu, Nov 22, 2007 at 12:00:51PM -0500, Christopher Faylor wrote:
>On Thu, Nov 22, 2007 at 04:41:54PM +0000, Andrew STUBBS wrote:
>>The attached patch adds a 'retry' to the fork system call. Basically
>>it waits 10 seconds to allow the 'resource temporarily unavailable' to
>>become (temporarily) available once more, and tries again, up to a
>>maximum of three attempts.
>
>There is already a retry in the fork and spawn system calls. This
>technique has proved to be problematic since it can mask problems and
>you can end up with situations where a process starts successfully but
>cygwin thinks it fails and restarts the process again. For the exec
>case, there is also a problem with non-cygwin .exes.
>
>If you look for retry in the fork call you should see where this is
>supposed to be happening.
Btw, it is likely that if you are seeing this problem that there is
something happening after the retry code in fork which is causing an
EAGAIN. The existing retry code could be expanded to take that into
account if that is the case.
cgf