Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50072 invoked by uid 1010); 10 Nov 2004 18:54:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 50027 invoked from network); 10 Nov 2004 18:54:12 -0000 Received: from unknown (HELO jc.netevil.org) (69.55.227.66) by pb1.pair.com with SMTP; 10 Nov 2004 18:54:12 -0000 Received: from ([66.80.117.2:3698]) by jc.netevil.org (ecelerity HEAD) with SMTP id 49/00-00943-3D362914 for ; Wed, 10 Nov 2004 10:54:11 -0800 Message-ID: <419263D0.1040705@thebrainroom.com> Date: Wed, 10 Nov 2004 13:54:08 -0500 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "ilya77@gmail.com" CC: Antony Dovgal , internals@lists.php.net References: <20041110190818.5964bc98.tony2001@phpclub.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak From: wez@thebrainroom.com (Wez Furlong) proc_terminate should set the child handle to INVALID_HANDLE_VALUE after it closes the handle, and the dtor should check that the child handle is valid before it closes it. --Wez. ilya77@gmail.com wrote: > Hi Antony, > > Makes sense to me, however, what about TerminateProcess() in > PHP_FUNCTION(proc_terminate)? > As far as I recall (don't take my word for it), TerminateProcess() > closes the handle for you, am I missing something? Can it break things > on future releases of the OS? > >>>PHP_FUNCTION(proc_close) doesn't have a call to >>>CloseHandle(proc->child), to close the process handle. >>>This is causing a handle leak on Windows