about summary refs log tree commit diff
path: root/library/std/src/sys/process
diff options
context:
space:
mode:
authorChristopher Durham <cad97@cad97.com>2024-09-19 00:15:03 -0400
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2025-04-27 02:18:08 +0300
commit4d93f6056824c338751f19356d33bb61ce818749 (patch)
tree44c5e3f9da28279a1e391f19ea6367677bf0adfa /library/std/src/sys/process
parent96b4ed90c658acf7f180bf1b95192b4f08802059 (diff)
use generic Atomic type where possible
in core/alloc/std only for now, and ignoring test files

Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
Diffstat (limited to 'library/std/src/sys/process')
-rw-r--r--library/std/src/sys/process/unix/unix.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/process/unix/unix.rs b/library/std/src/sys/process/unix/unix.rs
index 478f6583b1f..ae1c9558281 100644
--- a/library/std/src/sys/process/unix/unix.rs
+++ b/library/std/src/sys/process/unix/unix.rs
@@ -442,7 +442,7 @@ impl Command {
         envp: Option<&CStringArray>,
     ) -> io::Result<Option<Process>> {
         #[cfg(target_os = "linux")]
-        use core::sync::atomic::{AtomicU8, Ordering};
+        use core::sync::atomic::{Atomic, AtomicU8, Ordering};
 
         use crate::mem::MaybeUninit;
         use crate::sys::{self, cvt_nz, on_broken_pipe_flag_used};
@@ -475,7 +475,7 @@ impl Command {
                     fn pidfd_getpid(pidfd: libc::c_int) -> libc::c_int;
                 );
 
-                static PIDFD_SUPPORTED: AtomicU8 = AtomicU8::new(0);
+                static PIDFD_SUPPORTED: Atomic<u8> = AtomicU8::new(0);
                 const UNKNOWN: u8 = 0;
                 const SPAWN: u8 = 1;
                 // Obtaining a pidfd via the fork+exec path might work