Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 7aab31520..260960895 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -326,12 +326,9 @@ frok::parent (void *stack_here)
/* Wait for subproc to initialize itself. */
if (!ch.sync (pi.dwProcessId, pi.hProcess, FORK_WAIT_TIMEOUT))
{
- DWORD exit_code;
- if (GetExitCodeProcess (pi.hProcess, &exit_code) && exit_code == EXITCODE_RETRY)
- {
- ch.retry--;
- continue;
- }
+ DWORD exit_code = ch.fork_retry (pi.hProcess);
+ if (!exit_code)
+ continue;
this_errno = EAGAIN;
/* Not thread safe, but do we care? */
static char buf[sizeof("died waiting for longjmp before "