|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-14 21:07 UTC] php at fungusmovies dot com
[2004-07-14 21:09 UTC] chris at starglade dot org
[2004-07-14 21:29 UTC] wez@php.net
[2004-07-22 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 10 04:00:01 2025 UTC |
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.