+ static public function killProcess($file) {
+ $pid = self::pidFromFile($file);
+
+ // We don't have a process id? then we quit
+ if (!$pid) {
+ return false;
+ }
+
+ // We now kill the process
+ $killed = posix_kill($pid, SIGTERM);
+
+ // If we killed the process successfully, we can remove the pidfile
+ if ($killed) {
+ self::delete($file);
+ }
+ return $killed;