summaryrefslogtreecommitdiff
path: root/ext/standard/proc_open.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-06-30 17:21:21 +0200
committerAnatol Belski <ab@php.net>2015-07-02 14:22:57 +0200
commitd516a14fb93705ec03b39e611899a95bc0d591fe (patch)
treec1377d9607a397c2bca35818ee9f4f9692c24308 /ext/standard/proc_open.c
parent1a5a4d546ede8fcdf7a9cc4462858bfedf3644d9 (diff)
downloadphp-git-d516a14fb93705ec03b39e611899a95bc0d591fe.tar.gz
properly set the pipe blocking option
Diffstat (limited to 'ext/standard/proc_open.c')
-rw-r--r--ext/standard/proc_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index cee4728a54..447cbbcc6e 100644
--- a/ext/standard/proc_open.c
+++ b/ext/standard/proc_open.c
@@ -546,7 +546,6 @@ PHP_FUNCTION(proc_open)
}
#ifdef PHP_WIN32
- php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, blocking_pipes, NULL);
descriptors[ndesc].childend = dup_fd_as_handle((int)fd);
if (descriptors[ndesc].childend == NULL) {
php_error_docref(NULL, E_WARNING, "unable to dup File-Handle for descriptor %d", nindex);
@@ -941,6 +940,7 @@ PHP_FUNCTION(proc_open)
#ifdef PHP_WIN32
stream = php_stream_fopen_from_fd(_open_osfhandle((zend_intptr_t)descriptors[i].parentend,
descriptors[i].mode_flags), mode_string, NULL);
+ php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, blocking_pipes, NULL);
#else
stream = php_stream_fopen_from_fd(descriptors[i].parentend, mode_string, NULL);
# if defined(F_SETFD) && defined(FD_CLOEXEC)