]> granicus.if.org Git - php/commitdiff
MFB: fix #36427. patch by jdolecek at NetBSD dot org
authorNuno Lopes <nlopess@php.net>
Sun, 31 Dec 2006 15:28:56 +0000 (15:28 +0000)
committerNuno Lopes <nlopess@php.net>
Sun, 31 Dec 2006 15:28:56 +0000 (15:28 +0000)
ext/standard/proc_open.c

index a3f56dbff8ea6e6e09b67966476e04b9e726bc33..ada763a7d3562dda58676760310032cadbb93c10 100644 (file)
@@ -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