]> sourceware.org Git - newlib-cygwin.git/commitdiff
* external.cc (fillout_pinfo): Handle explicit pids correctly.
authorChristopher Faylor <me@cgf.cx>
Wed, 13 Sep 2000 02:35:05 +0000 (02:35 +0000)
committerChristopher Faylor <me@cgf.cx>
Wed, 13 Sep 2000 02:35:05 +0000 (02:35 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/external.cc

index b83ca47cfd9df35c788dc461336d3a1accd72227..479fb726387467ae95a315c5310968cfabfae0bf 100644 (file)
@@ -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.
index 74b106959e917309a2cf9d17ad5c8c2d003213f8..1bd86f5dadb7693df5a1da52e3561eb9e737ba9e 100644 (file)
@@ -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;
This page took 0.032138 seconds and 5 git commands to generate.