ID:               34654
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sebastian dot forsman at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Sockets related
 Operating System: Linux 2.4.28
 PHP Version:      5.0.5
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Nothing strange about this--it's not called blocking for lack of a
better name. When a socket enters blocking mode, the application yields
control to the socket library, from where it does not return until a
socket event takes place. If you want more control, you need to set
your sockets to non-blocking mode.


Previous Comments:
------------------------------------------------------------------------

[2005-09-27 10:52:21] sebastian dot forsman at gmail dot com

Description:
------------
I am not sure if this is a bug or a 'feature', but when PHP is
blocking, registered tick functions aren't run. It also delays handling
of the Unix signals (which use ticks).

Reproduce code:
---------------
http://pastebin.com/375512

Expected result:
----------------
(You need Linux, posix-, pcntl- and socket-functions to run the
script.) The code snippet will start a simple single-client server. Try
sending a "kill <pid>" from the shell to the process. It won't react to
the signal in any way, until a connection is received (try "telnet
localhost 22500").

Same applies to registered tick functions. If you modify the code and
register a tick function, it is not run at all when socket_accept() is
waiting for a connection.

Yes of course you can set the socket non-blocking, but then you are
missing the point.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34654&edit=1

Reply via email to