From c901cbfa9fdbe065ab03ccd859bdd6d975fc8d3b Mon Sep 17 00:00:00 2001 From: Jason Heath Date: Wed, 1 Mar 2023 13:49:06 -0500 Subject: [PATCH] a fix for the change in signal mask introduced in https://github.com/rust-lang/rust/pull/101077/ --- components/core/src/os/process/exec/unix.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/core/src/os/process/exec/unix.rs b/components/core/src/os/process/exec/unix.rs index 8e5507307e7..d854c9303d7 100644 --- a/components/core/src/os/process/exec/unix.rs +++ b/components/core/src/os/process/exec/unix.rs @@ -37,6 +37,15 @@ pub fn hook_command(executable: X, env: I, ids: Option<(Uid, Gid)>) with_user_and_group_information(&mut cmd, uid, gid); } + unsafe { + use nix::sys::signal::{pthread_sigmask, SigSet, SigmaskHow}; + cmd.pre_exec(|| { + let newset = SigSet::all(); + pthread_sigmask(SigmaskHow::SIG_UNBLOCK, Some(&newset), None)?; + Ok(()) + }); + } + cmd }