* 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.
This commit is contained in:
parent
eeec2a4835
commit
ca17537785
|
@ -1,3 +1,10 @@
|
||||||
|
2002-03-15 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-03-15 Corinna Vinschen <corina@vinschen.de>
|
2002-03-15 Corinna Vinschen <corina@vinschen.de>
|
||||||
|
|
||||||
* glob.c (stat32_to_STAT): New function.
|
* glob.c (stat32_to_STAT): New function.
|
||||||
|
|
|
@ -94,7 +94,7 @@ enum
|
||||||
PID_USETTY = 0x1000, // Setting this enables or disables cygwin's
|
PID_USETTY = 0x1000, // Setting this enables or disables cygwin's
|
||||||
// tty support. This is inherited by
|
// tty support. This is inherited by
|
||||||
// all execed or forked processes.
|
// all execed or forked processes.
|
||||||
PID_UNUSED2 = 0x2000, // child has execed
|
PID_ALLPIDS = 0x2000, // child has execed
|
||||||
PID_EXECED = 0x4000, // redirect to original pid info block
|
PID_EXECED = 0x4000, // redirect to original pid info block
|
||||||
PID_NOREDIR = 0x8000, // don't redirect if execed
|
PID_NOREDIR = 0x8000, // don't redirect if execed
|
||||||
PID_EXITED = 0x80000000 // Free entry.
|
PID_EXITED = 0x80000000 // Free entry.
|
||||||
|
|
|
@ -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);
|
api_fatal ("retrieval of execed process info for pid %d failed due to recursion.", n);
|
||||||
n = realpid;
|
n = realpid;
|
||||||
release ();
|
release ();
|
||||||
if (flag & PID_NOREDIR)
|
if (flag & PID_ALLPIDS)
|
||||||
{
|
{
|
||||||
set_errno (ENOENT);
|
set_errno (ENOENT);
|
||||||
break;
|
break;
|
||||||
|
@ -287,7 +287,7 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid)
|
||||||
pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist + 1));
|
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)
|
if (winpid)
|
||||||
/* nothing to do */;
|
/* nothing to do */;
|
||||||
else if (!pinfolist[nelem])
|
else if (!pinfolist[nelem])
|
||||||
|
|
Loading…
Reference in New Issue