public function handle(Args $args, IO $io)
    {
        $processTitle = $this->config->getProcessTitle();

        $this->warnIfProcessTitleNotSupported($processTitle, $io);

        if ($processTitle && ProcessTitle::isSupported()) {
            ProcessTitle::setProcessTitle($processTitle);

            try {
                $statusCode = $this->doHandle($args, $io);
            } catch (Exception $e) {
                ProcessTitle::resetProcessTitle();

                throw $e;
            }

            ProcessTitle::resetProcessTitle();
        } else {
            $statusCode = $this->doHandle($args, $io);
        }

        // Any empty value is considered a success
        if (!$statusCode) {
            return 0;
        }

        // Anything else is normalized to a valid error status code
        // (i.e. one of [1, 255])
        return min(max((int) $statusCode, 1), 255);
    }