protected function saveCurrentPID()
    {
        $pid = getmypid();
        $this->setConfig('runtime.pid', $pid);
        $filename = self::getLogPath() . "pid.log";

        if (is_writable($filename)) {
            return @file_put_contents($filename, $pid);
        }

        return false;
    }