]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/daemon.php
Sanitize html returned by oEmbed providers to protect laconica from XSS attacks
[quix0rs-gnu-social.git] / lib / daemon.php
index 72e8bc20286a7a97ebe62f03088a4912a957082c..231f5414e9ab44a7e66faf338ddf2fef31d9982d 100644 (file)
@@ -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();
         }