Skip to content

Ignore SIGINT in parent during child command execution#2230

Open
joaquinhuigomez wants to merge 1 commit intopypa:masterfrom
joaquinhuigomez:fix/sigint-handling-2228
Open

Ignore SIGINT in parent during child command execution#2230
joaquinhuigomez wants to merge 1 commit intopypa:masterfrom
joaquinhuigomez:fix/sigint-handling-2228

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

Fixes #2228. When hatch run executes a child command, the parent process now ignores SIGINT so that only the child handles Ctrl-C. Previously the terminal's SIGINT reached both processes, causing hatch to abort with KeyboardInterrupt even when the child (e.g. a Python REPL or Jupyter) intended to stay alive. The original handler is restored after each command completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hatch run handles keyboard interrupt (but maybe should defer to child)

1 participant