protected function stopServer($address, $pid = null)
    {
        $success = true;
        if ($pid && function_exists('posix_kill')) {
            /** @noinspection PhpComposerExtensionStubsInspection */
            $success = posix_kill($pid, SIGTERM);
            if (!$success) {
                /** @noinspection PhpComposerExtensionStubsInspection */
                $this->stdErr->writeln(sprintf(
                    'Failed to kill process <error>%d</error> (POSIX error %s)',
                    $pid,
                    posix_get_last_error()
                ));
            }
        }
        $pidFile = $this->getPidFile($address);
        if (file_exists($pidFile)) {
            $success = unlink($pidFile) && $success;
        }
        unset($this->serverInfo[$address]);
        $this->saveServerInfo();

        return $success;
    }