diff options
author | Christopher Faylor <me@cgf.cx> | 2004-12-28 01:27:26 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-12-28 01:27:26 +0000 |
commit | 57ba174fa0fd038154f5f24a32cad566796ee2a6 (patch) | |
tree | 2ec65739c0f0ddbf83d1a22d7b1ca635c65c594d /winsup/cygwin/spawn.cc | |
parent | 432524c16251a6d40716978ac4d0eb1188b1256a (diff) | |
download | cygnal-57ba174fa0fd038154f5f24a32cad566796ee2a6.tar.gz cygnal-57ba174fa0fd038154f5f24a32cad566796ee2a6.tar.bz2 cygnal-57ba174fa0fd038154f5f24a32cad566796ee2a6.zip |
* cygthread.cc (cygthread::stub): Add better debug output.
(cygthread::cygthread): Ditto.
(cygthread::terminate_thread): Ditto. Move inuse test earlier or suffer
infinite loop.
* pinfo.cc (_pinfo::dup_proc_pipe): Close handle if DuplicateHandle fails and
process no longer exists.
* spawn.cc (spawn_guts): Create process in suspended state if OS demands it.
* wincap.cc: Add "start_proc_suspended" throughout.
* wincap.h (wincaps): Ditto.
(wincapc): Ditto.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 3fcf92c19..e18b3e20a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -645,7 +645,8 @@ spawn_guts (const char * prog_arg, const char *const *argv, after CreateProcess and before copying the datastructures to the child. So we have to start the child in suspend state, unfortunately, to avoid a race condition. */ - if (mode != _P_OVERLAY || cygheap->fdtab.need_fixup_before ()) + if (wincap.start_proc_suspended() || mode != _P_OVERLAY + || cygheap->fdtab.need_fixup_before ()) flags |= CREATE_SUSPENDED; const char *runpath = null_app_name ? NULL : (const char *) real_path; |