#40735 [Opn->Fbk]: stream_select returns 0 for php > 5.1.6

From: Date: Mon, 05 Mar 2007 22:47:35 +0000
Subject: #40735 [Opn->Fbk]: stream_select returns 0 for php > 5.1.6
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109948@lists.php.net to get a copy of this message
ID: 40735 Updated by: tony2001@php.net Reported By: rodricg at sellingsource dot com -Status: Open +Status: Feedback Bug Type: Streams related Operating System: x86_64 GNU/Linux PHP Version: 5CVS-2007-03-05 (snap) New Comment: Tested on Linux/Intel 64, Linux/AMD 64, Linux/PPC 64 & Solaris/SPARC 64. In all cases I get: Selected: 2 Read: Array ( [0] => Resource id #5 ) Write: Array ( [0] => Resource id #5 ) Previous Comments: ------------------------------------------------------------------------ [2007-03-05 22:39:19] rodricg at sellingsource dot com Description: ------------ Since php 5.2.0 stream_select fails to return the number of modified descriptors on a 64bit Linux OS (32bit seems to be immune to this). Verified to exist in the php-snap php5.2-200703052130. This bug is the same as #40458 but I am unable to modify the status of that bug. Reproduce code: --------------- <?php $sock = stream_socket_client('tcp://maila.microsoft.com:25', $eno, $estr, 10, STREAM_CLIENT_CONNECT); stream_set_blocking($sock, 0); sleep(1); $r = $w = array($sock); $n = stream_select($r, $w, $e = NULL, 10); echo "Selected: {$n}\n"; echo "Read: ", print_r($r,1); echo "Write: ", print_r($w,1); ?> Expected result: ---------------- Selected: 2 Read: Array ( [0] => Resource id #5 ) Write: Array ( [0] => Resource id #5 ) Actual result: -------------- Selected: 0 Read: Array ( [0] => Resource id #5 ) Write: Array ( [0] => Resource id #5 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40735&edit=1

« previous php.bugs (#109948) next »