diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/standard/proc_open.c | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -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 |