villebro commented on code in PR #2590:
URL:
https://github.com/apache/datafusion-ballista/pull/2590#discussion_r4276058042
##########
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:
@avantgardnerio that's an excellent catch, will throw these in (I'm just
picking this up again now that #2577 merged, so I'll keep it in Draft until all
is cleaned up).
--
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]