'Sets signal handlers for signals in _SIGNALS.'

def _set_signal_handlers(self):

    for signum in _SIGNALS:
        prev_handler = signal.getsignal(signum)
        if (prev_handler is not None):
            self.prev_handlers[signum] = prev_handler
            signal.signal(signum, self._signal_handler)
