Skip to content

Fix SIGINT hanndling inside debugee #539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/debugpy/launcher/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def main():
log.to_file(prefix="debugpy.launcher")
log.describe_environment("debugpy.launcher startup environment:")

# Disable exceptions on Ctrl+C - we want to allow the debuggee process to handle
# these, or not, as it sees fit. If the debuggee exits on Ctrl+C, the launcher
# will also exit, so it doesn't need to observe the signal directly.
signal.signal(signal.SIGINT, signal.SIG_IGN)
if sys.platform == "win32":
# For windows, disable exceptions on Ctrl+C - we want to allow the debuggee
# process to handle these, or not, as it sees fit. If the debuggee exits
# on Ctrl+C, the launcher will also exit, so it doesn't need to observe
# the signal directly.
signal.signal(signal.SIGINT, signal.SIG_IGN)

# Everything before "--" is command line arguments for the launcher itself,
# and everything after "--" is command line arguments for the debuggee.
Expand Down