protected function sendSignal($sig) { if ($pid = $this->getPid()) { posix_kill($pid, $sig); } else { echo "not running!" . PHP_EOL; exit(1); } }