From: Nuno Lopes Date: Sun, 31 Dec 2006 15:27:13 +0000 (+0000) Subject: - Fixed bug #36427 (proc_open() / proc_close() leak handles on windows). X-Git-Tag: php-5.2.1RC2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=169b20753287b203feceacdd564025fafa105532;p=php - Fixed bug #36427 (proc_open() / proc_close() leak handles on windows). --- diff --git a/NEWS b/NEWS index 5cd9da4a47..b334edefc5 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,8 @@ PHP NEWS - Fixed bug #38542 (proc_get_status() returns wrong PID on windows). (Nuno) - Fixed bug #37588 (COM Property propputref converts to PHP function and can't be accesed). (Rob) +- Fixed bug #36427 (proc_open() / proc_close() leak handles on windows). + (jdolecek at NetBSD dot org, Nuno) - Fixed bug #36392 (wrong number of decimal digits with %e specifier in sprintf). (Matt,Ilia) - Fixed bug #33734 (Something strange with COM Object). (Rob) diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 3ed72566c3..6b366623e3 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -660,7 +660,8 @@ PHP_FUNCTION(proc_open) } #ifdef PHP_WIN32 - descriptors[ndesc].childend = (HANDLE)_get_osfhandle(fd); + descriptors[ndesc].childend = dup_fd_as_handle(fd); + _close(fd); #else descriptors[ndesc].childend = fd; #endif