* 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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user