diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-19 14:59:27 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-19 14:59:27 +0000 |
commit | 3bacc423cf1c295ba2abe7d4a39add6752cac225 (patch) | |
tree | 3ffeec9a89443033f29450ded812f186d84987a3 /winsup/cygwin/pinfo.h | |
parent | 34f72894755ffb134d011d2a3817931c915ac47e (diff) | |
download | cygnal-3bacc423cf1c295ba2abe7d4a39add6752cac225.tar.gz cygnal-3bacc423cf1c295ba2abe7d4a39add6752cac225.tar.bz2 cygnal-3bacc423cf1c295ba2abe7d4a39add6752cac225.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/pinfo.h')
-rw-r--r-- | winsup/cygwin/pinfo.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 8a090cfd9..dcb814bcc 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -131,7 +131,7 @@ class pinfo { HANDLE h; _pinfo *procinfo; - int destroy; + bool destroy; public: void init (pid_t n, DWORD create = 0, HANDLE h = NULL) __attribute__ ((regparm(3))); pinfo () {} @@ -154,10 +154,15 @@ public: _pinfo *operator * () const {return procinfo;} operator _pinfo * () const {return procinfo;} // operator bool () const {return (int) h;} -#ifdef _SIGPROC_H - int remember () {destroy = 0; return proc_subproc (PROC_ADDCHILD, (DWORD) this);} -#else +#ifndef _SIGPROC_H 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 HANDLE shared_handle () {return h;} }; |