* 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.
This commit is contained in:
Christopher Faylor 2005-09-22 21:10:07 +00:00
parent b30dbbe2c3
commit 4340c43955
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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 */;