Skip to content

Commit

Permalink
Hotfix as a follow-up to #69: close stdin of the orchestrator to avoi…
Browse files Browse the repository at this point in the history
…d interference with the children's stdin
  • Loading branch information
pavel-kirienko committed Dec 9, 2022
1 parent d80caae commit d9774a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion yakut/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.0
0.12.1
4 changes: 4 additions & 0 deletions yakut/cmd/orchestrate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit d9774a7

Please sign in to comment.