From e94d09da9449cabd7ece2acd98d52b1946a922a4 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Tue, 27 Feb 2024 03:49:01 -0700 Subject: Remove custom errors and fix background forking Removes the custom errors in src/recite/erro.rs, and replaces them with std::io::Errors throughout (recite(), incant_, macros). Fixed a bug with the way forking to the background is handled, where registering the signal handler in main for all processes would break couplets (i.e. pipes). Instead, this sets up a new signal handler each time a process is forked into the background. It uses a Vec to keep track of all the background processes. --- src/recite/erro.rs | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/recite/erro.rs (limited to 'src/recite/erro.rs') diff --git a/src/recite/erro.rs b/src/recite/erro.rs deleted file mode 100644 index 00f57b3..0000000 --- a/src/recite/erro.rs +++ /dev/null @@ -1,15 +0,0 @@ -use thiserror::Error; - -#[derive(Error, Debug)] -pub enum Mishap { - #[error("broken pipe: {0}")] - BrokenPipe(String), - // #[error("exec format error: {0}")] - // ExecFormat(String), - #[error("permission denied: {0}")] - PermissionDenied(String), - #[error("terminated: {0}")] - Terminated(String), - #[error("exec error: {0}")] - Else(String), -} -- cgit v1.2.3