Bug #34972 [Com]: STDIN won't allow nonblocking.

From: Date: Tue, 31 Aug 2010 11:13:27 +0000
Subject: Bug #34972 [Com]: STDIN won't allow nonblocking.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-153974@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=34972&edit=1 ID: 34972 Comment by: me at ben-xo dot com Reported by: VJTD3 at VJTD3 dot com Summary: STDIN won't allow nonblocking. Status: Assigned Type: Bug Package: Streams related Operating System: win32 only PHP Version: 5.2CVS-2008-07-15 Assigned To: pajoye Block user comment: N New Comment: Experiencing this issue on Win 32 with PHP 5.3.2. stream_set_blocking(STDIN, 0) ('correctly') returns false and does not allow non-blocking. Also experiencing issues using stream_select() on STDIN. STDIN always comes back as ready for reading, but reading from it blocks. Previous Comments: ------------------------------------------------------------------------ [2010-02-26 01:47:14] joseph at none-yo-business dot com Hope this helps someone else, but the workaround I had to do was to fread(stdin) from another script, output to a temp file, then use output in my other script. Yeah its ugly, but at least I have an interactive shell (or should that be shells :) Dear PHP developers. I love php. Its the glue that holds everything I do together.... Please take this in the best way possible, WTF? This bug should not be there... And 4 years after the fact?! Please help me love PHP even more, and fix this bug. ------------------------------------------------------------------------ [2009-11-14 15:31:44] raskin at aoeu dot ru Confirmed on Nov 14th, 2009 with PHP 5.2.11 on WinXp Yet no useful fix. Linux (Ubuntu 9.10 is just fine) ------------------------------------------------------------------------ [2009-07-22 22:58:50] xektrum at gmail dot com I can confirm this bug affects PHP 5.3.0. today at July 22 2009 almost 4 years from its submittion and still no fix. This is very important since you can't create a really interactive CLI application with this issue, and stops developers from choosing PHP to theirs CLI/CMD/Console application (Although this could affect PHP-GTK users and developers) Hope this fix soon Regards ------------------------------------------------------------------------ [2009-04-16 17:48:36] frase at cs dot wisc dot edu I'm having the same trouble. With php-5.3.0-beta1 on Linux it works fine, both on STDIN and on fopen('/dev/ttyS0'). stream_set_blocking() returns true, stream_get_meta_data() confirms, and the stream behaves as if non-blocking. But with php-5.2.9 on Windows 2000 it doesn't work for either STDIN or the serial port (COM1 instead of /dev/ttyS0). stream_set_blocking() returns false, stream_get_meta_data() shows blocking, and the streams do in fact block. I also tried stream_set_timeout() with a tiny value, to simulate the effect, but that also returns false and doesn't work. ------------------------------------------------------------------------ [2008-10-24 16:11:54] jani@php.net Assigned to the windows port maintainer. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=34972 -- Edit this bug report at http://bugs.php.net/bug.php?id=34972&edit=1

« previous php.bugs (#153974) next »