summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/pinfo.cc9
2 files changed, 15 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 096304ed9..f1a607580 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-22 Christopher Faylor <cgf@timesys.com>
+
+ * 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.
+
2005-09-22 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix copy/paste
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 */;