Skip to content

Fix a bug where the shutdown handler could be called again#8243

Merged
AlexPeshkoff merged 1 commit intoFirebirdSQL:masterfrom
Zhdanov0:master-call-shutdown-handler-twice
Sep 5, 2024
Merged

Fix a bug where the shutdown handler could be called again#8243
AlexPeshkoff merged 1 commit intoFirebirdSQL:masterfrom
Zhdanov0:master-call-shutdown-handler-twice

Conversation

@Zhdanov0
Copy link
Copy Markdown
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.

4 participants