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