From 566ffb49f360d72412f44c8f271b33a3e3f8a5aa Mon Sep 17 00:00:00 2001 From: Moritz Ruth Date: Sat, 2 Mar 2024 18:17:02 +0100 Subject: [PATCH] commit --- README.md | 4 ++-- src/handler_runner.rs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) 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:#?}"); }