PHP4 Bug #1845: fgets() won't return in non_blocking mode
| From: | wico at cnh dot nl | Date: | Fri, 23 Jul 1999 07:30:59 +0000 |
| Subject: | PHP4 Bug #1845: fgets() won't return in non_blocking mode | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9024@lists.php.net to get a copy of this message | ||
From: wico@cnh.nl
Operating system: linux
PHP version: 4.0 Beta 1
PHP Bug Type: Misbehaving function
Bug description: fgets() won't return in non_blocking mode
Same bug as in php 3.0.11 (iss fixed in cvs 3.0.12-dev)
test script:
<?
echo "plop<BR>\n"; flush();
$fp = fsockopen("irc.net.local", 4400);
if ($fp) {
set_socket_blocking($fp, 0);
fputs($fp,"PASS :wisky\nSERVER Wico.net.local 1 932044265 932044265 J10 A 0 :plop\n");
while (1 < 2) {
$out = fgets($fp, 1000);
/* won't come heter until socjket closes or mamy many
data is send */
flush();
if ($out) {
echo "boe: '$out'<BR>\n";
flush();
}
}
}
?>