From 9c754139fbe20feceb02e1dc429163616b415b86 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Sun, 31 Dec 2006 15:28:56 +0000 Subject: [PATCH] MFB: fix #36427. patch by jdolecek at NetBSD dot org --- ext/standard/proc_open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.50.1