(self)
Setup kill signal handlers.
Setup kill signal handlers.
Setup kill signal handlers .
def _init_signals(self):
        """
        Setup kill signal handlers.
        """
        signals = ['TERM', 'HUP', 'QUIT', 'INT']

        for signame in signals:
            """
            SIGHUP and SIGQUIT are not available on Windows, so just don't register a handler for them
            if they don't exist.
            """
            sig = getattr(signal, 'SIG%s' % signame, None)
            
            if sig:
                signal.signal(sig, self.receive_signal)
def _init_signals ( self ) : signals = [ 'TERM' , 'HUP' , 'QUIT' , 'INT' ] for signame in signals : """
            SIGHUP and SIGQUIT are not available on Windows, so just don't register a handler for them
            if they don't exist.
            """ sig = getattr ( signal , 'SIG%s' % signame , None ) if sig : signal . signal ( sig , self . receive_signal )