diff --git a/crates/util/src/command.rs b/crates/util/src/command.rs index dde1603dfe..40f1ec323f 100644 --- a/crates/util/src/command.rs +++ b/crates/util/src/command.rs @@ -58,7 +58,7 @@ pub fn new_smol_command(program: impl AsRef) -> smol::process::Command { } #[cfg(target_os = "macos")] -fn reset_exception_ports() { +pub fn reset_exception_ports() { use mach2::exception_types::{ EXC_MASK_ALL, EXCEPTION_DEFAULT, exception_behavior_t, exception_mask_t, }; diff --git a/crates/util/src/util.rs b/crates/util/src/util.rs index 169da43b52..4ea3590196 100644 --- a/crates/util/src/util.rs +++ b/crates/util/src/util.rs @@ -390,6 +390,8 @@ pub fn set_pre_exec_to_start_new_session( use std::os::unix::process::CommandExt; command.pre_exec(|| { libc::setsid(); + #[cfg(target_os = "macos")] + crate::command::reset_exception_ports(); Ok(()) }); };