1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Files
archived-php-src/ext/phar/tests
Nikita Popov d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
..
2018-01-28 21:51:25 +01:00
2019-07-21 00:49:35 +02:00
2019-07-21 00:49:35 +02:00
2018-01-28 21:51:25 +01:00
2018-02-08 10:32:08 +01:00
2018-01-15 12:20:10 +01:00
2018-09-21 14:12:25 +02:00
2016-02-15 09:00:07 +01:00
2016-03-09 14:16:29 +01:00
2016-06-21 16:20:03 +02:00
2018-12-02 12:06:13 -08:00
2019-03-04 14:28:47 +01:00
2019-07-21 00:49:35 +02:00
2019-05-14 10:11:29 +02:00
2016-11-20 14:16:50 +01:00
2019-05-14 10:11:29 +02:00
2019-05-14 10:11:29 +02:00
2018-06-30 15:35:43 +02:00