diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-13 02:35:05 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-13 02:35:05 +0000 |
commit | 858f5249178e01ca9a2ca375158a8633f20a4f3a (patch) | |
tree | b2a09cfdeec28d3a585af11c84a7b50ccb87acd2 /winsup/cygwin | |
parent | 67826e2264c4b3218e0cb5ca1bff681efd0dba66 (diff) | |
download | newlib-858f5249178e01ca9a2ca375158a8633f20a4f3a.zip newlib-858f5249178e01ca9a2ca375158a8633f20a4f3a.tar.gz newlib-858f5249178e01ca9a2ca375158a8633f20a4f3a.tar.bz2 |
* external.cc (fillout_pinfo): Handle explicit pids correctly.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/external.cc | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b83ca47..479fb72 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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> * path.cc (normalize_posix_path): Fix more slashdot madness. diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 74b1069..1bd86f5 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -31,7 +31,7 @@ fillout_pinfo (pid_t pid, int winpid) static winpids pids (0); - if (!pids.npids) + if (!pids.npids || !nextpid) pids.init (); static unsigned int i = 0; @@ -48,14 +48,14 @@ fillout_pinfo (pid_t pid, int winpid) if (!p) { - if (!winpid) + if (!winpid || (!nextpid && thispid != pid)) continue; ep.pid = thispid; ep.dwProcessId = cygwin_pid (thispid); ep.process_state = PID_IN_USE; ep.ctty = -1; } - else if (p->pid) + else if (nextpid || p->pid == pid) { ep.ctty = tty_attached (p) ? p->ctty : -1; ep.pid = p->pid; |