com php-src: Merge branch 'PHP-5.6' into PHP-7.0: main/streams/ plain_wrapper.c
| From: | Xinchen Hui | Date: | Wed, 17 Aug 2016 08:56:02 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6' into PHP-7.0: main/streams/ plain_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93870@lists.php.net to get a copy of this message | ||
Commit: 3956deb1b20f8f7a9cabb3015cb3c9bb79fbf0be
Author: Xinchen Hui <laruence@gmail.com> Wed, 17 Aug 2016 16:56:02 +0800
Parents: ed9d916c28b042d276a28998f92eb7e6cc56025a abe00908afa2b7227cfd601ee948ff3b57c27eb7
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php..net/?p=php-src.git;a=commitdiff;h=3956deb1b20f8f7a9cabb3015cb3c9bb79fbf0be
Log:
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Fixed bug #72853 (stream_set_blocking doesn't work)
Conflicts:
main/streams/plain_wrapper.c
Bugs:
https://bugs.php.net/72853
Changed paths:
MM main/streams/plain_wrapper.c
Diff:
diff --cc main/streams/plain_wrapper.c
index d510c90,f472bad..140e5e1
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@@ -845,13 -818,19 +845,25 @@@ static int php_stdiop_set_option(php_st
return ftruncate(fd, new_size) == 0 ? PHP_STREAM_OPTION_RETURN_OK :
PHP_STREAM_OPTION_RETURN_ERR;
}
}
+
+#ifdef PHP_WIN32
+ case PHP_STREAM_OPTION_PIPE_BLOCKING:
+ data->is_pipe_blocking = value;
+ return PHP_STREAM_OPTION_RETURN_OK;
+#endif
+ case PHP_STREAM_OPTION_META_DATA_API:
+ if (fd == -1)
+ return -1;
+ #ifdef O_NONBLOCK
+ flags = fcntl(fd, F_GETFL, 0);
+ add_assoc_bool((zval*)ptrparam, "timed_out", 0);
+ add_assoc_bool((zval*)ptrparam, "blocked", (flags & O_NONBLOCK)? 0 : 1);
+ add_assoc_bool((zval*)ptrparam, "eof", stream->eof);
+
+ return PHP_STREAM_OPTION_RETURN_OK;
+ #endif
+ return -1;
default:
return PHP_STREAM_OPTION_RETURN_NOTIMPL;
}