avantgardnerio commented on code in PR #2590:
URL:
https://github.com/apache/datafusion-ballista/pull/2590#discussion_r4274215104
##########
ballista-cli/src/main.rs:
##########
@@ -125,6 +125,17 @@ pub async fn main() -> Result<(), Box<dyn
std::error::Error>> {
logging::init_logging(tui_mode.clone())?;
+ // Exit on SIGTERM, as the signal's default action would. That action
+ // doesn't apply to PID 1, which the CLI is in a container.
+ #[cfg(unix)]
+ tokio::spawn(async {
+ use tokio::signal::unix::{SignalKind, signal};
+ if let Ok(mut sigterm) = signal(SignalKind::terminate()) {
+ sigterm.recv().await;
+ std::process::exit(143);
Review Comment:
not a regression, so non-blocking for this PR, but perhaps a graceful
shutdown would be better?
Claude suggests REPL history saving and TUI cleanup will be skipped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]