+ pcntl_signal(SIGINT, 'task_sigint_handler');
+
+ register_shutdown_function('task_shutdown');
+
+ $my_pid = posix_getpid();
+ $lock_filename = "update_daemon-$my_pid.lock";
+
+ $lock_handle = make_lockfile($lock_filename);
+
+ if (!$lock_handle) {
+ die("error: Can't create lockfile ($lock_filename). ".
+ "Maybe another daemon is already running.\n");
+ }