From f3ea02b1cf5109c13f03e3d644c69b0ca4c16d5d Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 22 Dec 2005 03:16:36 +0000 Subject: * pinfo.cc (pinfo::init): Clarify comment slightly. (_onreturn): New helper class. (winpids:add): Remove copied stuff. Try to put process handle into pinfo in question and use _onreturn class to control when to close it. (winpids::release): Remove use of copied array. Free procinfo when hProc is NULL. Otherwise call release and call CloseHandle on hProc. * pinfo.h (winpids::copied): Remove throughout class. --- winsup/cygwin/pinfo.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/pinfo.h') diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 6c701d5a8..047fdae5b 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -205,7 +205,6 @@ class winpids DWORD npidlist; DWORD *pidlist; pinfo *pinfolist; - bool *copied; DWORD pinfo_access; // access type for pinfo open DWORD (winpids::* enum_processes) (bool winpid); DWORD enum_init (bool winpid); @@ -218,10 +217,9 @@ public: void set (bool winpid); winpids (): make_copy (true), enum_processes (&winpids::enum_init) {} winpids (int): make_copy (false), npidlist (0), pidlist (NULL), pinfolist (NULL), - copied (NULL), pinfo_access (0), enum_processes (&winpids::enum_init), - npids (0) {} + pinfo_access (0), enum_processes (&winpids::enum_init), npids (0) {} winpids (DWORD acc): make_copy (false), npidlist (0), pidlist (NULL), pinfolist (NULL), - copied (NULL), pinfo_access (acc), enum_processes (&winpids::enum_init), + pinfo_access (acc), enum_processes (&winpids::enum_init), npids (0) { set (0); -- cgit v1.2.3