-
Notifications
You must be signed in to change notification settings - Fork 12
Fixed graceful shutdown #414
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
pub struct Shutdown; | ||
impl Shutdown { | ||
pub async fn wait() -> Result<(), io::Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can't we just have a single function, without extra calls? Just having two wait
methods with different cfgs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Right now our validator doesn't handle SIGTERM, only SIGINT.
This pr adds handling of SIGTERM signal
Greptile Summary
Enhanced validator shutdown handling by adding SIGTERM support alongside SIGINT, implementing a dedicated shutdown module for more robust signal management and cleanup.
test-bins/src/shutdown.rs
implementing platform-aware signal handling for both SIGTERM and SIGINTtest-bins/src/rpc.rs
to use the new Shutdown type for improved termination managementcfg
attributes to support both Unix and non-Unix systems