|
|
|
@ -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) |
|
|
|
|