* external.cc (fillout_pinfo): Handle explicit pids correctly.
This commit is contained in:
parent
67826e2264
commit
858f524917
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Sep 12 22:33:30 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* external.cc (fillout_pinfo): Handle explicit pids correctly.
|
||||||
|
|
||||||
Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com>
|
Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* path.cc (normalize_posix_path): Fix more slashdot madness.
|
* path.cc (normalize_posix_path): Fix more slashdot madness.
|
||||||
|
|
|
@ -31,7 +31,7 @@ fillout_pinfo (pid_t pid, int winpid)
|
||||||
|
|
||||||
static winpids pids (0);
|
static winpids pids (0);
|
||||||
|
|
||||||
if (!pids.npids)
|
if (!pids.npids || !nextpid)
|
||||||
pids.init ();
|
pids.init ();
|
||||||
|
|
||||||
static unsigned int i = 0;
|
static unsigned int i = 0;
|
||||||
|
@ -48,14 +48,14 @@ fillout_pinfo (pid_t pid, int winpid)
|
||||||
|
|
||||||
if (!p)
|
if (!p)
|
||||||
{
|
{
|
||||||
if (!winpid)
|
if (!winpid || (!nextpid && thispid != pid))
|
||||||
continue;
|
continue;
|
||||||
ep.pid = thispid;
|
ep.pid = thispid;
|
||||||
ep.dwProcessId = cygwin_pid (thispid);
|
ep.dwProcessId = cygwin_pid (thispid);
|
||||||
ep.process_state = PID_IN_USE;
|
ep.process_state = PID_IN_USE;
|
||||||
ep.ctty = -1;
|
ep.ctty = -1;
|
||||||
}
|
}
|
||||||
else if (p->pid)
|
else if (nextpid || p->pid == pid)
|
||||||
{
|
{
|
||||||
ep.ctty = tty_attached (p) ? p->ctty : -1;
|
ep.ctty = tty_attached (p) ? p->ctty : -1;
|
||||||
ep.pid = p->pid;
|
ep.pid = p->pid;
|
||||||
|
|
Loading…
Reference in New Issue