summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-22 21:10:07 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-22 21:10:07 +0000
commit4340c43955131ac445d4d6e9b5fee36b1168ed9c (patch)
treeaa599bf79baeec09e7fee8567000874e5c71ee58 /winsup/cygwin/pinfo.cc
parentb30dbbe2c3df56a24a0523f58510cbfc39b80120 (diff)
downloadcygnal-4340c43955131ac445d4d6e9b5fee36b1168ed9c.tar.gz
cygnal-4340c43955131ac445d4d6e9b5fee36b1168ed9c.tar.bz2
cygnal-4340c43955131ac445d4d6e9b5fee36b1168ed9c.zip
* pinfo.cc (set_myself): Call strace.hello unconditionally when DEBUGGING.
(pinfo::init): Sleep and issue debugging output before looping when a PID_EXITED is found.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index f28d7155f..78964a486 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -54,7 +54,9 @@ set_myself (HANDLE h)
myself->dwProcessId = GetCurrentProcessId ();
GetModuleFileName (NULL, myself->progname, sizeof (myself->progname));
+#ifndef DEBUGGING
if (!strace.active)
+#endif
strace.hello ();
debug_printf ("myself->dwProcessId %u", myself->dwProcessId);
myself.initialize_lock ();
@@ -287,7 +289,12 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
brief occurrence, so rather than introduce some kind of locking
mechanism, just loop. */
if (!created && createit && (procinfo->process_state & PID_EXITED))
- goto loop;
+ {
+ debug_printf ("looping because pid %d, procinfo->pid %d, procinfo->dwProcessid %u has PID_EXITED set",
+ n, procinfo->pid, procinfo->dwProcessId);
+ low_priority_sleep (0);
+ goto loop;
+ }
if (!created)
/* nothing */;