mirror of
https://github.com/friendica/friendica
synced 2025-04-26 00:30:12 +00:00
Dead processes will be deleted when they are running for more than 9 minutes.
This commit is contained in:
parent
58cea13707
commit
e32f9c4fff
5 changed files with 31 additions and 8 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue