]> git.mxchange.org Git - friendica.git/blobdiff - util/daemon.php
Merge pull request #3919 from zeroadam/CodingStandards
[friendica.git] / util / daemon.php
index d1eb70d8b1554cda9886621a7ef907d18c574a7f..4accef3960a390dad4b8c79323e38be99671934b 100644 (file)
@@ -1,8 +1,10 @@
 <?php
-/*
-Run the poller from a daemon.
-This script was taken from http://php.net/manual/en/function.pcntl-fork.php
-*/
+/**
+ * @file util/daemon.php
+ * @brief Run the poller from a daemon.
+ *
+ * This script was taken from http://php.net/manual/en/function.pcntl-fork.php
+ */
 function shutdown() {
        posix_kill(posix_getpid(), SIGHUP);
 }
@@ -85,6 +87,9 @@ file_put_contents($pidfile, $pid);
 
 // Now running as a daemon.
 while (true) {
+       // Just to be sure that this script really runs endlessly
+       set_time_limit(0);
+
        // Call the poller
        $cmdline = $php.' include/poller.php';
 
@@ -93,4 +98,3 @@ while (true) {
        // Now sleep for 5 minutes
        sleep(300);
 }
-?>