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 a bug where the shutdown handler could be called again #8243

Merged

Conversation

Zhdanov0
Copy link
Contributor

@Zhdanov0 Zhdanov0 commented Sep 5, 2024

Two problems have been solved:

  1. Calling shutdown_handler with the SIGINT signal could have thrown the SIGTERM signal causing an unnecessary handler call. This was solved by throwing the same signal that was received.
  2. Although the signal is blocked during its handler, but apparently it is marked in the signal mask and with some probability can be processed during exit. This could cause a crash. This can be solved by changing the signal disposition to ignore in the handler.

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

Successfully merging this pull request may close these issues.

3 participants