From a7e4a6fb981e42f534f3a57ad8c83e67b6a7b440 Mon Sep 17 00:00:00 2001 From: Renze Post Date: Thu, 30 Nov 2023 16:57:21 +0100 Subject: [PATCH] Fix airflow db shell needing an extra keypress to exit --- airflow/utils/process_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/utils/process_utils.py b/airflow/utils/process_utils.py index 15844d9227b67..18798e85d027c 100644 --- a/airflow/utils/process_utils.py +++ b/airflow/utils/process_utils.py @@ -222,7 +222,7 @@ def execute_interactive(cmd: list[str], **kwargs) -> None: # ignore SIGINT in the parent process signal.signal(signal.SIGINT, signal.SIG_IGN) while proc.poll() is None: - readable_fbs, _, _ = select.select([sys.stdin, primary_fd], [], []) + readable_fbs, _, _ = select.select([sys.stdin, primary_fd], [], [], 0) if sys.stdin in readable_fbs: input_data = os.read(sys.stdin.fileno(), 10240) os.write(primary_fd, input_data)