]> git.proxmox.com Git - rustc.git/blobdiff - library/std/src/sys/unix/process/process_unix.rs
New upstream version 1.62.1+dfsg1
[rustc.git] / library / std / src / sys / unix / process / process_unix.rs
index 3d305cd7310fd4b8419d220d1adeadebb9fda914..23bb6d6c15f637fe1a36f61b5f5400d8125cefc9 100644 (file)
@@ -1,4 +1,3 @@
-use crate::convert::{TryFrom, TryInto};
 use crate::fmt;
 use crate::io::{self, Error, ErrorKind};
 use crate::mem;
@@ -328,6 +327,7 @@ impl Command {
         #[cfg(not(target_os = "emscripten"))]
         {
             use crate::mem::MaybeUninit;
+            use crate::sys::cvt_nz;
             // Reset signal handling so the child process starts in a
             // standardized state. libstd ignores SIGPIPE, and signal-handling
             // libraries often set a mask. Child processes inherit ignored
@@ -337,7 +337,7 @@ impl Command {
             // we're about to run.
             let mut set = MaybeUninit::<libc::sigset_t>::uninit();
             cvt(sigemptyset(set.as_mut_ptr()))?;
-            cvt(libc::pthread_sigmask(libc::SIG_SETMASK, set.as_ptr(), ptr::null_mut()))?;
+            cvt_nz(libc::pthread_sigmask(libc::SIG_SETMASK, set.as_ptr(), ptr::null_mut()))?;
 
             #[cfg(target_os = "android")] // see issue #88585
             {