diff options
-rw-r--r-- | ext/standard/proc_open.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index a3f56dbff8..ada763a7d3 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -652,7 +652,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 |