summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
Diffstat (limited to 'winsup')
-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 */;