Re: [PATCH] Bug #30743 - proc_close() causes a handle leak
| From: | ilya77@gmail.com | Date: | Wed, 10 Nov 2004 18:58:36 +0000 |
| Subject: | Re: [PATCH] Bug #30743 - proc_close() causes a handle leak | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13816@lists.php.net to get a copy of this message | ||
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 <wez@thebrainroom.com> 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
>
>