FirebirdSQL / firebird

Firebird server, client and tools
https://firebirdsql.org
1.26k stars 217 forks source link

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

Closed Zhdanov0 closed 2 months ago

Zhdanov0 commented 2 months ago

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.