1--TEST--
2Bug #79000: Non-blocking socket stream reports EAGAIN as error
3--SKIPIF--
4<?php
5if (PHP_OS_FAMILY == 'Windows') die('skip Not for Windows');
6?>
7--FILE--
8<?php
9
10[$sock1, $sock2] = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);
11$str = str_repeat('a', 1000000);
12stream_set_blocking($sock1, false);
13var_dump(fwrite($sock1, $str));
14var_dump(fwrite($sock1, $str));
15
16?>
17--EXPECTF--
18int(%d)
19int(%d)
20