diff --git a/crates/nu-cli/src/repl.rs b/crates/nu-cli/src/repl.rs index bf53a99402..e59f1e267f 100644 --- a/crates/nu-cli/src/repl.rs +++ b/crates/nu-cli/src/repl.rs @@ -213,20 +213,6 @@ pub fn evaluate_repl( use_color, ); - start_time = std::time::Instant::now(); - // Reset the SIGQUIT handler - if let Some(sig_quit) = engine_state.get_sig_quit() { - sig_quit.store(false, Ordering::SeqCst); - } - perf( - "reset sig_quit", - start_time, - file!(), - line!(), - column!(), - use_color, - ); - start_time = std::time::Instant::now(); let config = engine_state.get_config(); diff --git a/crates/nu-protocol/src/engine/engine_state.rs b/crates/nu-protocol/src/engine/engine_state.rs index 0ae464959c..ed962ff386 100644 --- a/crates/nu-protocol/src/engine/engine_state.rs +++ b/crates/nu-protocol/src/engine/engine_state.rs @@ -95,8 +95,6 @@ pub struct EngineState { pub table_decl_id: Option, #[cfg(feature = "plugin")] pub plugin_signatures: Option, - #[cfg(not(windows))] - sig_quit: Option>, config_path: HashMap, pub history_session_id: i64, // If Nushell was started, e.g., with `nu spam.nu`, the file's parent is stored here @@ -152,8 +150,6 @@ impl EngineState { table_decl_id: None, #[cfg(feature = "plugin")] plugin_signatures: None, - #[cfg(not(windows))] - sig_quit: None, config_path: HashMap::new(), history_session_id: 0, currently_parsed_cwd: None, @@ -862,21 +858,6 @@ impl EngineState { } } - #[cfg(not(windows))] - pub fn get_sig_quit(&self) -> &Option> { - &self.sig_quit - } - - #[cfg(windows)] - pub fn get_sig_quit(&self) -> &Option> { - &None - } - - #[cfg(not(windows))] - pub fn set_sig_quit(&mut self, sig_quit: Arc) { - self.sig_quit = Some(sig_quit) - } - pub fn set_config_path(&mut self, key: &str, val: PathBuf) { self.config_path.insert(key.to_string(), val); } diff --git a/src/main.rs b/src/main.rs index 87c0b73483..27f13ecb1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,7 +32,7 @@ use nu_protocol::{ use nu_std::load_standard_library; use nu_utils::utils::perf; use run::{run_commands, run_file, run_repl}; -use signals::{ctrlc_protection, sigquit_protection}; +use signals::ctrlc_protection; use std::{ io::BufReader, str::FromStr, @@ -78,7 +78,6 @@ fn main() -> Result<()> { let ctrlc = Arc::new(AtomicBool::new(false)); // TODO: make this conditional in the future ctrlc_protection(&mut engine_state, &ctrlc); - sigquit_protection(&mut engine_state); // Begin: Default NU_LIB_DIRS, NU_PLUGIN_DIRS // Set default NU_LIB_DIRS and NU_PLUGIN_DIRS here before the env.nu is processed. If diff --git a/src/signals.rs b/src/signals.rs index 1e71789824..740c020745 100644 --- a/src/signals.rs +++ b/src/signals.rs @@ -16,14 +16,3 @@ pub(crate) fn ctrlc_protection(engine_state: &mut EngineState, ctrlc: &Arc