diff options
author | Christopher Faylor <me@cgf.cx> | 2007-03-28 14:34:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2007-03-28 14:34:24 +0000 |
commit | 23197752739c82be1d0bf3eda9b1ef6647328816 (patch) | |
tree | ecdb0e2e4d28c1f38df381a8fdb624899527fbd7 /winsup | |
parent | 832a897240d78e7fed323cef28156e08720072b5 (diff) | |
download | newlib-23197752739c82be1d0bf3eda9b1ef6647328816.zip newlib-23197752739c82be1d0bf3eda9b1ef6647328816.tar.gz newlib-23197752739c82be1d0bf3eda9b1ef6647328816.tar.bz2 |
* spawn.cc (spawn_guts): Start pure-windows processes in a suspended state to
avoid potential DuplicateHandle problems.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index aa3ddcb..dbd8cd8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-03-28 Christopher Faylor <me@cgf.cx> + + * spawn.cc (spawn_guts): Start pure-windows processes in a suspended + state to avoid potential DuplicateHandle problems. + 2007-03-13 Eric Blake <ebb9@byu.net> * include/cygwin/stat.h (S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM): diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 510ed21..69a9043 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -455,7 +455,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, So we have to start the child in suspend state, unfortunately, to avoid a race condition. */ if (!newargv.win16_exe - && (mode != _P_OVERLAY || cygheap->fdtab.need_fixup_before ())) + && (!ch.iscygwin () || mode != _P_OVERLAY || cygheap->fdtab.need_fixup_before ())) c_flags |= CREATE_SUSPENDED; runpath = null_app_name ? NULL : (const char *) real_path; @@ -609,11 +609,9 @@ loop: if (!newargv.win16_exe && myself->wr_proc_pipe) { if (!looped) - { - myself->sync_proc_pipe (); /* Make sure that we own wr_proc_pipe - just in case we've been previously - execed. */ - } + myself->sync_proc_pipe (); /* Make sure that we own wr_proc_pipe + just in case we've been previously + execed. */ orig_wr_proc_pipe = myself->dup_proc_pipe (pi.hProcess); } pid = myself->pid; |