Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13816 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71283 invoked by uid 1010); 10 Nov 2004 18:59:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71248 invoked from network); 10 Nov 2004 18:59:07 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.192) by pb1.pair.com with SMTP; 10 Nov 2004 18:59:07 -0000 Received: by rproxy.gmail.com with SMTP id q1so290501rnf for ; Wed, 10 Nov 2004 10:59:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=VGUILJ9dVFHm329Edu+jyzJTMkxULCLka0oFqss+SiIywwa33ZWqUEapVJ36qLueVGNvZ5ZQWNQ4JWrCLc4hq6XVXMCus8eRNp+lK3Q41NnOyu7Ob382iaSUpRerLz7sNBs00ACKsCl2GGQsrcMecL7s30YFW/6KRSlpxFzaGUs= Received: by 10.38.74.43 with SMTP id w43mr565784rna; Wed, 10 Nov 2004 10:58:37 -0800 (PST) Received: by 10.38.70.1 with HTTP; Wed, 10 Nov 2004 10:58:36 -0800 (PST) Message-ID: Date: Wed, 10 Nov 2004 20:58:36 +0200 Reply-To: "ilya77@gmail.com" To: Wez Furlong Cc: Antony Dovgal , internals@lists.php.net In-Reply-To: <419263D0.1040705@thebrainroom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041110190818.5964bc98.tony2001@phpclub.net> <419263D0.1040705@thebrainroom.com> Subject: Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak From: ilya77@gmail.com ("ilya77@gmail.com") No no, I've checked the documentation. It seems that CloseHandle() is still required after terminating a process. Although MS documentation for it's own products is not always 100% accurate. I suggest checking this impirically... On Wed, 10 Nov 2004 13:54:08 -0500, Wez Furlong wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >