diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-20 18:01:17 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-20 18:01:17 +0000 |
commit | c1494e03a2374c5841e7b53e0a97a3af7438cc76 (patch) | |
tree | 8b4ada17832554189880d5da736748cbfa9e9102 /winsup/cygwin/sigproc.cc | |
parent | 4aedb2879609cd1c83b605d9470efdec9eedadd0 (diff) | |
download | cygnal-c1494e03a2374c5841e7b53e0a97a3af7438cc76.tar.gz cygnal-c1494e03a2374c5841e7b53e0a97a3af7438cc76.tar.bz2 cygnal-c1494e03a2374c5841e7b53e0a97a3af7438cc76.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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; |