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

Fix signal handling in SubprocessManager #2039

Closed
wants to merge 3 commits into from

Conversation

filipcacky
Copy link

Fixes #2038

I've moved signal handling to SubprocessManager and implemented it via asyncio/signal depending on the running context.

Comment on lines +79 to +87
async def handle_sigint():
await self._async_handle_sigint()

asyncio.get_running_loop().add_signal_handler(
signal.SIGINT, lambda: asyncio.create_task(handle_sigint())
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closure required in order to capture self, also asyncio signal handlers can't be async.

@savingoyal
Copy link
Collaborator

closing in favor of #2053

@savingoyal savingoyal closed this Sep 24, 2024
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.

Buggy signal handler impl in CommandManager and SubprocessManager
3 participants