Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-03-16 00:49:12 +0300
committerChristopher Faylor <me@cgf.cx>2002-03-16 00:49:12 +0300
commitca175377858b9582040d995c4343e8edbdc524e2 (patch)
treeb390950dc9e821a3df08427c48ad0b1d553b73e3 /winsup/cygwin/pinfo.cc
parenteeec2a483539433bd9bee2b74f0cdbf5a5094555 (diff)
* pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a redirected
block should be marked as nonexistent. (winpids::add): Use PID_ALLPIDS when looking for all pids. * cygwin.h (PID_ALLPIDS): New enum element.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 8e497ef18..4531a8b19 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -183,7 +183,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h)
api_fatal ("retrieval of execed process info for pid %d failed due to recursion.", n);
n = realpid;
release ();
- if (flag & PID_NOREDIR)
+ if (flag & PID_ALLPIDS)
{
set_errno (ENOENT);
break;
@@ -287,7 +287,7 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid)
pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist + 1));
}
- pinfolist[nelem].init (cygpid, PID_NOREDIR);
+ pinfolist[nelem].init (cygpid, PID_NOREDIR | (winpid ? PID_ALLPIDS : 0));
if (winpid)
/* nothing to do */;
else if (!pinfolist[nelem])