diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index f5a659d86..a504828fe 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -319,6 +319,19 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) /* Fetching process info for /proc or ps? just ignore this one. */ if (flag & PID_NOREDIR) break; + /* FIXME: Do we ever hit this case? And if so, in what situation? */ + system_printf ("This shouldn't happen:\n" + " me: (%d, %d, %d, %W)\n" + " pid %d\n" + " process_state %y\n" + " cygstarted %d\n" + " dwProcessId %d\n" + " name %W", + myself->pid, myself->dwProcessId, myself->cygstarted, + myself->progname, + procinfo->pid, procinfo->process_state, + procinfo->cygstarted, procinfo->dwProcessId, + procinfo->progname); /* If not populated, wait 2 seconds for procinfo to become populated. Would like to wait with finer granularity but that is not easily doable. */