(self, sig)
return True
Remove a handler for a signal.  UNIX only.

        Return True if a signal handler was removed, False if not.
Remove a handler for a signal.  UNIX only.
Remove a handler for a signal . UNIX only .
def remove_signal_handler(self, sig):
        """Remove a handler for a signal.  UNIX only.

        Return True if a signal handler was removed, False if not.
        """
        self._check_signal(sig)
        try:
            del self._signal_handlers[sig]
        except KeyError:
            return False

        if sig == signal.SIGINT:
            handler = signal.default_int_handler
        else:
            handler = signal.SIG_DFL

        try:
            signal.signal(sig, handler)
        except OSError as exc:
            if exc.errno == errno.EINVAL:
                raise RuntimeError(f'sig {sig} cannot be caught')
            else:
                raise

        if not self._signal_handlers:
            try:
                signal.set_wakeup_fd(-1)
            except (ValueError, OSError) as exc:
                logger.info('set_wakeup_fd(-1) failed: %s', exc)

        return True
def remove_signal_handler ( self , sig ) : self . _check_signal ( sig ) try : del self . _signal_handlers [ sig ] except KeyError : return False if sig == signal . SIGINT : handler = signal . default_int_handler else : handler = signal . SIG_DFL try : signal . signal ( sig , handler ) except OSError as exc : if exc . errno == errno . EINVAL : raise RuntimeError ( f'sig {sig} cannot be caught' ) else : raise if not self . _signal_handlers : try : signal . set_wakeup_fd ( - 1 ) except ( ValueError , OSError ) as exc : logger . info ( 'set_wakeup_fd(-1) failed: %s' , exc ) return True