ID:               29153
 Comment by:       php at fungusmovies dot com
 Reported By:      chris at starglade dot org
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Linux (2.4)
 PHP Version:      5.0.0
 New Comment:

PHP version 5.0.0 has been out only 1 day.  It is impossible for you to
reproduce this issue (7 day crash) since it was released.  Please fix
your Version entry in the bug report to the ACTUAL VERSION of php you
are using.


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

[2004-07-14 16:21:20] chris at starglade dot org

Description:
------------
I am running a PHP script as a daemon, and it stops running after
exactly 7 days. The script forks then enters a while loop, which should
always return true if the socket is open. It is not a problem with the
remote server closing the socket as other clients can connect for long
periods of time. Data is constantly being sent down the socket (every
90 seconds).

Reproduce code:
---------------
$pid = pcntl_fork();

while(false !== ($text = fgets($sock, 2048)))
{
handle_text($text);
}



Expected result:
----------------
I expect the script to fork and run until the socket is closed by the
server, the script is terminated by a signal, or the socket pings out. 

Actual result:
--------------
The script stops running after exactly 7 days as if it had closed the
connection, and returns to the command line. There are no error
messages given.


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


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

Reply via email to