Skip to content
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

Add support for terminate requests or configurable termination signal for running sessions #21605

Closed
benfiola opened this issue Jul 11, 2023 · 4 comments
Labels
feature-request Request for new features or functionality

Comments

@benfiola
Copy link

benfiola commented Jul 11, 2023

Original discussion for context.

It appears that when terminating a running Python session - a SIGKILL is sent to the underlying process. While this does indeed kill the underlying process, it also prevents any sort of clean-up behavior (i.e., context managers, signal handlers, etc.).

It'd be great if I could either:

  • Configure the signal being sent on session termination (i.e., a SIGTERM instead of a SIGKILL)
  • Use terminate requests to more natively handle the problem
@benfiola benfiola added the feature-request Request for new features or functionality label Jul 11, 2023
@benfiola
Copy link
Author

If either of these seem worthwhile, I'd be more than happy to submit a PR implementing the feature as I love the IDE, love this plugin and would love to contribute back.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 11, 2023
@karthiknadig karthiknadig self-assigned this Jul 11, 2023
@karthiknadig karthiknadig added needs community feedback Awaiting community feedback and removed triage-needed Needs assignment to the proper sub-team labels Jul 11, 2023
@karthiknadig karthiknadig removed their assignment Jul 11, 2023
@github-actions
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@karthiknadig
Copy link
Member

karthiknadig commented Jul 11, 2023

@benfiola This probably needs to be updated over in debugpy/pydevd first to support it.

Here is the code where this is handled on terminateRequest from VS Code: https://github.com/microsoft/debugpy/blob/6735fcb073c0453d57eab25109a25385f610281b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_api.py#L1083

This will need a setting added to the launch configuration (in python extension), and it will have to be passed through from debugpy to underlying pydevd where this is handled.

@brettcannon
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2023
@github-actions github-actions bot removed the needs community feedback Awaiting community feedback label Sep 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants