private static function checkPcntl()
    {
        if (static::$pcntlEnabled === null) {
            if (!extension_loaded('pcntl')) {
                static::$pcntlEnabled = false;

                return true;
            }
            static::$pcntlEnabled = true;

            if (version_compare(PHP_VERSION, '7.1', '>=')) {
                pcntl_async_signals(true);
                static::$pcntlAsync = true;
            }

            // This can be dispatched multiple times when resizing,
            // so it's important that we throttle fetching dimensions.
            pcntl_signal(SIGWINCH, function () {
                static::$pcntlNeedsUpdate = true;
            });
        } elseif (static::$pcntlEnabled === false) {
            return true;
        }

        if (!static::$pcntlAsync) {
            pcntl_signal_dispatch();
        }

        return static::$pcntlNeedsUpdate;
    }