diff --git a/src/main.rs b/src/main.rs index 0c66e7ed02..389d21224d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,13 +97,17 @@ fn take_control(interactive: bool) { _ => { // fish also has other heuristics than "too many attempts" for the orphan check, but they're optional if signal::killpg(Pid::from_raw(-shell_pgid.as_raw()), Signal::SIGTTIN).is_err() { + if !interactive { + // that's fine + return; + } eprintln!("ERROR: failed to SIGTTIN ourselves"); std::process::exit(1); } } } } - if !success { + if !success && interactive { eprintln!("ERROR: failed take control of the terminal, we might be orphaned"); std::process::exit(1); }