]> git.mxchange.org Git - friendica.git/blobdiff - include/pidfile.php
Merge remote-tracking branch 'upstream/develop' into 1509-i18n-events
[friendica.git] / include / pidfile.php
index 47df8d1f4624ef43fa2430d013f4000f8edad411..4f5b25ad756521af2dee7626a26beb6c83395964 100644 (file)
@@ -28,5 +28,14 @@ class pidfile {
        public function is_already_running() {
                return $this->_running;
        }
+
+       public function running_time() {
+               return(time() - filectime($this->_file));
+       }
+
+       public function kill() {
+               if (file_exists($this->_file))
+                       return(posix_kill(file_get_contents($this->_file), SIGTERM));
+       }
 }
 ?>