From: Nuno Lopes Date: Sun, 31 Dec 2006 15:28:56 +0000 (+0000) Subject: MFB: fix #36427. patch by jdolecek at NetBSD dot org X-Git-Tag: RELEASE_1_0_0RC1~447 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c754139fbe20feceb02e1dc429163616b415b86;p=php MFB: fix #36427. patch by jdolecek at NetBSD dot org --- 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