* child_info.h (child_status): New enum.
(child_info::flag): Rename from 'straced'. (child_info::isstraced): New function. (child_info::iscygwin): Ditto. (child_info_fork::handle_fork): Reparmize. (child_info_fork::handle_failure): Ditto. (child_info_spawn::handle_spawn): New function. * dcrt0.cc (get_cygwin_startup_info): Use isstraced method. (child_info_spawn::handle_spawn): Define new function from code previously in dll_crt0_0. (dll_crt0_0): Move spawn stuff into handle_spawn. Only call init_console_handler for fork case. * sigproc.cc (child_info::child_info): Set flag appropriately. (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin process. * spawn.cc (spawn_guts): Remove commented out flag setting.
This commit is contained in:
@ -785,7 +785,11 @@ child_info::child_info (unsigned in_cb, child_info_types chtype, bool need_subpr
|
||||
sigproc_printf ("subproc_ready %p", subproc_ready);
|
||||
cygheap = ::cygheap;
|
||||
cygheap_max = ::cygheap_max;
|
||||
straced = strace.attached ();
|
||||
flag = 0;
|
||||
if (strace.attached ())
|
||||
flag |= _CI_STRACED;
|
||||
if (need_subproc_ready)
|
||||
flag |= _CI_ISCYGWIN;
|
||||
retry = child_info::retry_count;
|
||||
/* Create an inheritable handle to pass to the child process. This will
|
||||
allow the child to duplicate handles from the parent to itself. */
|
||||
@ -903,7 +907,7 @@ child_info::proc_retry (HANDLE h)
|
||||
/* Count down non-recognized exit codes more quickly since they aren't
|
||||
due to known conditions. */
|
||||
default:
|
||||
if ((exit_code & 0xc0000000) != 0xc0000000)
|
||||
if (!iscygwin () && (exit_code & 0xc0000000) != 0xc0000000)
|
||||
break;
|
||||
if ((retry -= 2) < 0)
|
||||
retry = 0;
|
||||
|
Reference in New Issue
Block a user