diff --git a/README.md b/README.md index 53a8573..79e35b0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Deckster ## To do -- Exit with a non-zero status code when a handler process exits unexpectedly. - Move loupedeck_serial and pa_volume_interface out of this repository. -- +- Publish libraries to crates.io +- Move handlers to their own repositories ## Contributing ### Terminology diff --git a/src/handler_runner.rs b/src/handler_runner.rs index c24dd95..34f0e8d 100644 --- a/src/handler_runner.rs +++ b/src/handler_runner.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::ffi::OsString; use std::path::Path; -use std::process::Stdio; +use std::process::{exit, Stdio}; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; @@ -226,6 +226,8 @@ async fn start_handler( None => log::error!("The '{handler_name}' handler was unexpectedly terminated by a signal."), Some(code) => log::error!("The '{handler_name}' handler exited unexpectedly with status code {code}"), } + + exit(1); } else { log::debug!("The '{handler_name}' handler exited: {exit_status:#?}"); }