From 57ba174fa0fd038154f5f24a32cad566796ee2a6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 28 Dec 2004 01:27:26 +0000 Subject: * 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. --- winsup/cygwin/spawn.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/spawn.cc') 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; -- cgit v1.2.3