def _set_up_signal_handler():
    LOGGER.debug('Setting up signal handler')

    def signal_handler(signal_number, stack_frame):
        Server.get_current().stop()
    signal.signal(signal.SIGTERM, signal_handler)
    signal.signal(signal.SIGINT, signal_handler)
    if (sys.platform == 'win32'):
        signal.signal(signal.SIGBREAK, signal_handler)
    else:
        signal.signal(signal.SIGQUIT, signal_handler)
def _set_up_signal_handler():
    LOGGER.debug('Setting up signal handler')

    def signal_handler(signal_number, stack_frame):
        Server.get_current().stop()
    signal.signal(signal.SIGTERM, signal_handler)
    signal.signal(signal.SIGINT, signal_handler)
    if (sys.platform == 'win32'):
        signal.signal(signal.SIGBREAK, signal_handler)
    else:
        signal.signal(signal.SIGQUIT, signal_handler)