diff options
author | Anatol Belski <ab@php.net> | 2015-06-30 15:47:25 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-07-02 14:22:55 +0200 |
commit | 734d907aa4d5f6005c1c32e2d5a229b059954d81 (patch) | |
tree | 6b612c877850cb57d254ca59c8291130e1ae9c50 /ext/standard/php_fopen_wrapper.c | |
parent | 6de750efb727180f6f594dbfb92c9fb46ed55049 (diff) | |
download | php-git-734d907aa4d5f6005c1c32e2d5a229b059954d81.tar.gz |
initial stuff to make allow blocking pipes on windows
Diffstat (limited to 'ext/standard/php_fopen_wrapper.c')
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index f004c943b5..c3bd4b0048 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -400,6 +400,15 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa if (stream == NULL) { close(fd); } +#ifdef PHP_WIN32 + { + zval *blocking_pipes = php_stream_context_get_option(context, "pipe", "blocking"); + if (blocking_pipes) { + convert_to_long(blocking_pipes); + php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, Z_LVAL_P(blocking_pipes), NULL); + } + } +#endif } return stream; |