Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread Wez Furlong
Fixed in CVS. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread 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. [EMAIL PROTECTED] wrote: Hi Antony, Makes sense to me, however, what about TerminateProcess() in PHP_FUNCTION(proc_t

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread Derick Rethans
On Wed, 10 Nov 2004, [EMAIL PROTECTED] wrote: > I'm sorry, I'm a bit new to CVS, so I don't yet know how to produce a > unified diff. A command-line sample would be great - I'm learning > fast. > In fact it's my first time with PHP internals sources. Put this in ~/.cvsrc: upd -dP diff -upNw and

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread Antony Dovgal
On Wed, 10 Nov 2004 17:49:45 +0200 "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Guys, > > 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, and eventually brings the > whole OS to it's knees.

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread Derick Rethans
On Wed, 10 Nov 2004, [EMAIL PROTECTED] wrote: > Hi Guys, > > 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, and eventually brings the > whole OS to it's knees. > > Here's the fixed code snippet (t

[PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread [EMAIL PROTECTED]
Hi Guys, 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, and eventually brings the whole OS to it's knees. Here's the fixed code snippet (there's a DIFF at the end of the file): - cut her

Re: [PHP-DEV] [PATCH] Bug #30743 - proc_close() causes a handle leak

2004-11-10 Thread [EMAIL PROTECTED]
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? Thanks! On Wed, 10 Nov 200