diff options
author | Nuno Lopes <nlopess@php.net> | 2006-12-31 15:27:13 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-12-31 15:27:13 +0000 |
commit | 169b20753287b203feceacdd564025fafa105532 (patch) | |
tree | df0ea21ae8964ed156dc1be69a609034c7574896 | |
parent | 877ee656224faf7b1dfc69b4af3740fa8c89d7c1 (diff) | |
download | php-git-169b20753287b203feceacdd564025fafa105532.tar.gz |
- Fixed bug #36427 (proc_open() / proc_close() leak handles on windows).
-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 |