From d9774a7b28da468c75cfb73f945ade64af82168d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Fri, 9 Dec 2022 12:25:12 +0200 Subject: [PATCH] Hotfix as a follow-up to #69: close stdin of the orchestrator to avoid interference with the children's stdin --- yakut/VERSION | 2 +- yakut/cmd/orchestrate/__init__.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yakut/VERSION b/yakut/VERSION index ac454c6..34a8361 100644 --- a/yakut/VERSION +++ b/yakut/VERSION @@ -1 +1 @@ -0.12.0 +0.12.1 diff --git a/yakut/cmd/orchestrate/__init__.py b/yakut/cmd/orchestrate/__init__.py index 6a7b706..8abe465 100644 --- a/yakut/cmd/orchestrate/__init__.py +++ b/yakut/cmd/orchestrate/__init__.py @@ -279,6 +279,10 @@ def on_signal(s: int, _: Any) -> None: sig_num = s _logger.info("Orchestrator received signal %s %r, stopping...", s, signal.strsignal(s)) + # This is necessary to avoid interference with the children's stdin, + # otherwise, the terminal input might be consumed by the orchestrator. + sys.stdin.close() + signal.signal(signal.SIGINT, on_signal) signal.signal(signal.SIGTERM, on_signal) if not sys.platform.startswith("win"):