diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-15 00:29:14 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-15 00:29:14 +0000 |
commit | f02400f7c9db8176a7cc49eb8e4b6450ae5901c2 (patch) | |
tree | 0743a8f834f02fa2e76e6eb521894e63b23d6ce0 /winsup/cygwin/dcrt0.cc | |
parent | 67f85ee7b2d2a7bd531cb82c84dc3eea0f397ab2 (diff) | |
download | cygnal-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/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 46fdf926c..26a749c0a 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -642,6 +642,26 @@ get_cygwin_startup_info () return res; } +DWORD +child_info_fork::fork_retry (HANDLE h) +{ + DWORD exit_code; + if (!GetExitCodeProcess (h, &exit_code)) + return STILL_ACTIVE; /* should never happen */ + switch (exit_code) + { + case STATUS_CONTROL_C_EXIT: + if (retry-- > 0) + return 0; + break; + case EXITCODE_RETRY: + if (retry-- > 0) + return 0; + break; + } + return exit_code; +} + bool child_info_fork::handle_failure (DWORD err) { |