From ef8bff85be3057385b34a4c0f8ba2b274041ffcc Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 24 Nov 2011 21:36:53 +0000 Subject: * cygthread.h (cygthread::name): Default name to "main" if we are early in the process of setting up the DLL and no name is known. * dcrt0.cc (initial_env): Remove CYGWIN_SLEEP stuff. (get_cygwin_startup_info): Activate strace here as appropriate. (dll_crt0_0): Move get_cygwin_startup_info as early as possible to avoid missing strace output. * fork.cc (frok::child): Move debugging statement to point where ppid will be set. * pinfo.cc (pinfo::thisproc): Remove obsolete call to strace.hello. Tweak debug output slightly. * select.cc (select_stuff::wait): Allow APCS to be triggered while waiting since we use them now. Report when that happens. * sigproc.cc (child_info::child_info): Use strace.active() rather than strace.attached(). * spawn.cc (child_info_spawn::worker): Only write strace child pid when we know it's a cygwin process. Accommodate change to write_child argument list. * strace.cc (strace::hello): Delete. Move functionality... (strace::activate): ...to here. (mypid): Just use raw GetCurrentProcessId () if myself isn't set. (strace::write_childpid): Don't wait for subproc_ready. Remove arg which was required for it. * include/sys/strace.h (strace::hello): Delete. (strace::write_childpid): Delete first argument. --- winsup/cygwin/spawn.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 688655c8a..6fd7fbe33 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -693,8 +693,8 @@ loop: } /* The CREATE_SUSPENDED case is handled below */ - if (!(c_flags & CREATE_SUSPENDED)) - strace.write_childpid (*this, pi.dwProcessId); + if (iscygwin () && !(c_flags & CREATE_SUSPENDED)) + strace.write_childpid (pi.dwProcessId); /* Fixup the parent data structures if needed and resume the child's main thread. */ @@ -787,7 +787,8 @@ loop: if (c_flags & CREATE_SUSPENDED) { ResumeThread (pi.hThread); - strace.write_childpid (*this, pi.dwProcessId); + if (iscygwin ()) + strace.write_childpid (pi.dwProcessId); } ForceCloseHandle (pi.hThread); -- cgit v1.2.3