Handle SIGTERM the same as SIGINT for triggering snarkos shutdown
kyle-u410 opened this issue Β· comments
π Feature
SIGTERM
is an alias for SIGINT
.
Motivation
Currently SIGINT
is used to trigger shutdown with SIGTERM
triggering immediate exit. This is non-standard. SIGTERM
is the default termination signal used by most tools. The result of using SIGTERM
is likely ledger corruption.
I have helped a number of validators (including ourselves) understand to modify tooling to use SIGINT
. We can avoid this by keeping SIGINT
handling the same and adding duplicate handling for SIGTERM
.
Implementation
Add SIGTERM
handlers which are the same as SIGINT
.
Thanks for opening a feature request! We already handle INT, TERM, HUP and QUIT in the same way. Perhaps I am misunderstanding what you have in mind?
Hey great. It looks like https://github.com/AleoNet/snarkOS/pull/3102/files already implemented this.
Sorry for the duplicate. It seem that by switching to SIGINT this helped some validators in Canary, but based on when the code was merged and the patch itself, there must have been another cause.
I will switch our tooling overback to SIGTERM and confirm expected behavior.