X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fpidfile.php;h=4f5b25ad756521af2dee7626a26beb6c83395964;hb=d55275f211f5e03f7dc60e2c460aa9d3d34f44d9;hp=47df8d1f4624ef43fa2430d013f4000f8edad411;hpb=34d268544e565985014ada4369e8673c87883a0a;p=friendica.git diff --git a/include/pidfile.php b/include/pidfile.php index 47df8d1f46..4f5b25ad75 100644 --- a/include/pidfile.php +++ b/include/pidfile.php @@ -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)); + } } ?>