X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fdaemon.php;h=231f5414e9ab44a7e66faf338ddf2fef31d9982d;hb=ac75772150c3fe9411408ac44db04e774d095aa0;hp=72e8bc20286a7a97ebe62f03088a4912a957082c;hpb=0c3bfc2212ef74cacac73e670ff063124bd67af5;p=quix0rs-gnu-social.git diff --git a/lib/daemon.php b/lib/daemon.php index 72e8bc2028..231f5414e9 100644 --- a/lib/daemon.php +++ b/lib/daemon.php @@ -24,6 +24,7 @@ if (!defined('LACONICA')) { class Daemon { var $daemonize = true; + var $_id = 'generic'; function __construct($daemonize = true) { @@ -35,6 +36,16 @@ class Daemon return null; } + function get_id() + { + return $this->_id; + } + + function set_id($id) + { + $this->_id = $id; + } + function background() { $pid = pcntl_fork(); @@ -138,6 +149,7 @@ class Daemon } if ($this->daemonize) { + common_log(LOG_INFO, 'Backgrounding daemon "'.$this->name().'"'); $this->background(); }