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

Handle SIGTERM in asyncio #125688

Closed
PSanetra opened this issue Oct 18, 2024 · 4 comments
Closed

Handle SIGTERM in asyncio #125688

PSanetra opened this issue Oct 18, 2024 · 4 comments
Labels
stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement

Comments

@PSanetra
Copy link

PSanetra commented Oct 18, 2024

Feature or enhancement

Proposal:

#32105 did introduce handling of SIGINT signals in asyncio.run(). I think it makes sense to support handling of SIGTERM signals in the same way as both signals are intended for shutting down a process gracefully. SIGTERM is also the default signal to stop a container: https://docs.docker.com/reference/cli/docker/container/stop/

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

@PSanetra PSanetra added the type-feature A feature request or enhancement label Oct 18, 2024
@ZeroIntensity ZeroIntensity added topic-asyncio stdlib Python modules in the Lib dir labels Oct 18, 2024
@github-project-automation github-project-automation bot moved this to Todo in asyncio Oct 18, 2024
@ZeroIntensity
Copy link
Member

cc @graingert, you're better at dealing with asyncio stuff than I am.

@graingert
Copy link
Contributor

cpython doesn't define a handler for SIGTERM for synchronous code, so I don't think asyncio should either

@ZeroIntensity ZeroIntensity added the pending The issue will be closed if no feedback is provided label Oct 18, 2024
@ZeroIntensity
Copy link
Member

@PSanetra, I'm going to suggest taking this to DPO. If it's not clear that something is a no-brainer, it generally has to get discussed there.

@graingert
Copy link
Contributor

Let's close this for now

@github-project-automation github-project-automation bot moved this from Todo to Done in asyncio Oct 21, 2024
@ZeroIntensity ZeroIntensity removed the pending The issue will be closed if no feedback is provided label Oct 21, 2024
@ZeroIntensity ZeroIntensity closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement
Projects
Status: Done
Development

No branches or pull requests

3 participants