diff options
Diffstat (limited to 'ext/standard/proc_open.c')
-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 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 |