* pinfo.h (pinfo::remember): Arrange for destructor call if proc_subproc
returns error. * sigproc.cc (zombies): Store 1 + total zombies since proc_subproc uses NZOMBIES element.
This commit is contained in:
parent
34f7289475
commit
3bacc423cf
@ -1,3 +1,10 @@
|
|||||||
|
2002-08-19 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* pinfo.h (pinfo::remember): Arrange for destructor call if
|
||||||
|
proc_subproc returns error.
|
||||||
|
* sigproc.cc (zombies): Store 1 + total zombies since proc_subproc uses
|
||||||
|
NZOMBIES element.
|
||||||
|
|
||||||
2002-08-19 Corinna Vinschen <corinna@vinschen.de>
|
2002-08-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
|
* pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
|
||||||
|
@ -131,7 +131,7 @@ class pinfo
|
|||||||
{
|
{
|
||||||
HANDLE h;
|
HANDLE h;
|
||||||
_pinfo *procinfo;
|
_pinfo *procinfo;
|
||||||
int destroy;
|
bool destroy;
|
||||||
public:
|
public:
|
||||||
void init (pid_t n, DWORD create = 0, HANDLE h = NULL) __attribute__ ((regparm(3)));
|
void init (pid_t n, DWORD create = 0, HANDLE h = NULL) __attribute__ ((regparm(3)));
|
||||||
pinfo () {}
|
pinfo () {}
|
||||||
@ -154,10 +154,15 @@ public:
|
|||||||
_pinfo *operator * () const {return procinfo;}
|
_pinfo *operator * () const {return procinfo;}
|
||||||
operator _pinfo * () const {return procinfo;}
|
operator _pinfo * () const {return procinfo;}
|
||||||
// operator bool () const {return (int) h;}
|
// operator bool () const {return (int) h;}
|
||||||
#ifdef _SIGPROC_H
|
#ifndef _SIGPROC_H
|
||||||
int remember () {destroy = 0; return proc_subproc (PROC_ADDCHILD, (DWORD) this);}
|
|
||||||
#else
|
|
||||||
int remember () {system_printf ("remember is not here"); return 0;}
|
int remember () {system_printf ("remember is not here"); return 0;}
|
||||||
|
#else
|
||||||
|
int remember ()
|
||||||
|
{
|
||||||
|
int res = proc_subproc (PROC_ADDCHILD, (DWORD) this);
|
||||||
|
destroy = res ? false : true;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
HANDLE shared_handle () {return h;}
|
HANDLE shared_handle () {return h;}
|
||||||
};
|
};
|
||||||
|
@ -107,7 +107,7 @@ Static HANDLE events[PSIZE + 1]; // All my children's handles++
|
|||||||
#define hchildren (events + 1) // Where the children handles begin
|
#define hchildren (events + 1) // Where the children handles begin
|
||||||
Static char cpchildren[PSIZE * sizeof (pinfo)]; // All my children info
|
Static char cpchildren[PSIZE * sizeof (pinfo)]; // All my children info
|
||||||
Static int nchildren; // Number of active children
|
Static int nchildren; // Number of active children
|
||||||
Static char czombies[NZOMBIES * sizeof (pinfo)]; // All my deceased children info
|
Static char czombies[(NZOMBIES + 1) * sizeof (pinfo)]; // All my deceased children info
|
||||||
Static int nzombies; // Number of deceased children
|
Static int nzombies; // Number of deceased children
|
||||||
|
|
||||||
#define pchildren ((pinfo *) cpchildren)
|
#define pchildren ((pinfo *) cpchildren)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user