]> granicus.if.org Git - php/commitdiff
- Fixed bug #36427 (proc_open() / proc_close() leak handles on windows).
authorNuno Lopes <nlopess@php.net>
Sun, 31 Dec 2006 15:27:13 +0000 (15:27 +0000)
committerNuno Lopes <nlopess@php.net>
Sun, 31 Dec 2006 15:27:13 +0000 (15:27 +0000)
NEWS
ext/standard/proc_open.c

diff --git a/NEWS b/NEWS
index 5cd9da4a47a0e2eb4ace6c3d07388cb11a089923..b334edefc5a5418a416562ef9bc0fefbf14fc10f 100644 (file)
--- 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)
index 3ed72566c37bda869a047047dbe1fc92e2896ac5..6b366623e3a01ee88470e149967df8c5a0fc8fa6 100644 (file)
@@ -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