"""Set kill signal handler."""
            self.log.error("Received SIGTERM. Terminating subprocesses")
            self.task_runner.terminate()
            self.handle_task_exit(128 + signum)
        def segfault_signal_handler(signum, frame):
            """Set sigmentation violation signal handler."""
            self.log.critical(SIGSEGV_MESSAGE)
            self.task_runner.terminate()
            self.handle_task_exit(128 + signum)
            raise AirflowException("Segmentation Fault detected.")
        def sigusr2_debug_handler(signum, frame):
            import sys
            import threading
            import traceback
            id2name = {th.ident: th.name for th in threading.enumerate()}
            for threadId, stack in sys._current_frames().items():
                print(id2name[threadId])
                traceback.print_stack(f=stack)
        signal.signal(signal.SIGSEGV, segfault_signal_handler)
        signal.signal(signal.SIGTERM, signal_handler)
        if not IS_WINDOWS:
            
            signal.signal(signal.SIGUSR2, sigusr2_debug_handler)
        if not self.task_instance.check_and_change_state_before_execution(
            mark_success=self.mark_success,
            ignore_all_deps=self.ignore_all_deps,
            ignore_depends_on_past=self.ignore_depends_on_past,
            wait_for_past_depends_before_skipping=self.wait_for_past_depends_before_skipping,