* 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:
Christopher Faylor
2006-03-20 18:01:17 +00:00
parent 4aedb28796
commit c1494e03a2
5 changed files with 70 additions and 32 deletions

View File

@ -601,7 +601,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
int flags = GetPriorityClass (hMainProc);
sigproc_printf ("priority class %d", flags);
flags |= /* CREATE_DEFAULT_ERROR_MODE | */CREATE_SEPARATE_WOW_VDM;
flags |= CREATE_SEPARATE_WOW_VDM;
if (mode == _P_DETACH)
flags |= DETACHED_PROCESS;