X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpidfile.php;h=4f5b25ad756521af2dee7626a26beb6c83395964;hb=cdebdc777e38506e673864377ce17a5af91dd8a1;hp=47df8d1f4624ef43fa2430d013f4000f8edad411;hpb=c3139fa0fd49b0b4de4568d46a6946c75ccb2a62;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)); + } } ?>