From a52c79e859142c1cd5c0c5bdb73f16b754e1b98f Mon Sep 17 00:00:00 2001 From: Rain Date: Thu, 22 Sep 2022 22:48:14 -0700 Subject: Change process spawning to inherit the parent's signal mask by default Previously, the signal mask is always reset when a child process is started. This breaks tools like `nohup` which expect `SIGHUP` to be blocked. With this change, the default behavior changes to inherit the signal mask. This also changes the signal disposition for `SIGPIPE` to only be changed if the `#[unix_sigpipe]` attribute isn't set. --- library/std/src/rt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/std/src/rt.rs') diff --git a/library/std/src/rt.rs b/library/std/src/rt.rs index b8bcdbece0a..9c2f0c1dd3e 100644 --- a/library/std/src/rt.rs +++ b/library/std/src/rt.rs @@ -89,7 +89,7 @@ macro_rules! rtunwrap { // `src/tools/tidy/src/pal.rs` for more info. On all other platforms, `sigpipe` // has a value, but its value is ignored. // -// Even though it is an `u8`, it only ever has 3 values. These are documented in +// Even though it is an `u8`, it only ever has 4 values. These are documented in // `compiler/rustc_session/src/config/sigpipe.rs`. #[cfg_attr(test, allow(dead_code))] unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) { -- cgit 1.4.1-3-g733a5