|
|
|
@ -61,7 +61,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function sigalrm_handler() {
|
|
|
|
|
die("received SIGALRM, hang in feed update?\n");
|
|
|
|
|
die("[SIGALRM] hang in feed update?\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function sigchld_handler($signal) {
|
|
|
|
@ -74,7 +74,7 @@
|
|
|
|
|
|
|
|
|
|
function sigint_handler() {
|
|
|
|
|
unlink(LOCK_DIRECTORY . "/update_daemon.lock");
|
|
|
|
|
die("Received SIGINT. Exiting.\n");
|
|
|
|
|
die("[SIGINT] removing lockfile and exiting.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pcntl_signal(SIGALRM, 'sigalrm_handler');
|
|
|
|
@ -85,11 +85,6 @@
|
|
|
|
|
"Maybe another daemon is already running.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (file_is_locked("update_daemon.lock")) {
|
|
|
|
|
die("error: Can't create lockfile. ".
|
|
|
|
|
"Maybe another daemon is already running.\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!pcntl_fork()) {
|
|
|
|
|
pcntl_signal(SIGINT, 'sigint_handler');
|
|
|
|
|
|
|
|
|
@ -277,7 +272,7 @@
|
|
|
|
|
if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
|
|
|
|
|
|
|
|
|
|
_debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db_close($link);
|
|
|
|
|
|
|
|
|
|
// We are in a fork.
|
|
|
|
|