<?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);
}
// 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';