From c1494e03a2374c5841e7b53e0a97a3af7438cc76 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 20 Mar 2006 18:01:17 +0000 Subject: * 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. --- winsup/cygwin/sigproc.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a82e90002..00a6cf90e 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -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; -- cgit v1.2.3