protected function sigwait($sec = 0, $nano = 0.3e9)
    {
        $siginfo = null;

        if (!function_exists('pcntl_sigtimedwait')) {
            $signo = $this->sigtimedwait(array_keys(static::$signals), $siginfo, $sec, $nano);
        } else {
            $signo = @\pcntl_sigtimedwait(array_keys(static::$signals), $siginfo, $sec, $nano);
        }

        if (is_bool($signo)) {
            return $signo;
        }

        if ($signo > 0) {
            $this->sighandler($signo);

            return true;
        }

        return false;
    }