def cry_handler(signum, frame): """Signal handler logging the stacktrace of all active threads.""" set_in_sighandler(True) try: safe_say(cry()) finally: set_in_sighandler(False)
def cry_handler(*args): """Signal handler logging the stacktrace of all active threads.""" set_in_sighandler(True) try: safe_say(cry()) finally: set_in_sighandler(False)
def cry_handler(*args): """Signal handler logging the stacktrace of all active threads.""" with in_sighandler(): safe_say(cry())
def cry_handler(signum, frame): """Signal handler logging the stacktrace of all active threads.""" logger.error("\n" + cry())