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