summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fork.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-03-15 00:29:14 +0000
committerChristopher Faylor <me@cgf.cx>2006-03-15 00:29:14 +0000
commitf02400f7c9db8176a7cc49eb8e4b6450ae5901c2 (patch)
tree0743a8f834f02fa2e76e6eb521894e63b23d6ce0 /winsup/cygwin/fork.cc
parent67f85ee7b2d2a7bd531cb82c84dc3eea0f397ab2 (diff)
downloadcygnal-f02400f7c9db8176a7cc49eb8e4b6450ae5901c2.tar.gz
cygnal-f02400f7c9db8176a7cc49eb8e4b6450ae5901c2.tar.bz2
cygnal-f02400f7c9db8176a7cc49eb8e4b6450ae5901c2.zip
* child_info.h (child_info_fork::fork_retry): Declare new function.
* dcrt0.cc (child_info_fork::fork_retry): Define new function. * fork.cc (frok::parent): Move retry decision into child_info_fork::fork_retry and honor what it tells us to do. * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
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 "