Skip to content

Commit 5ac8a31

Browse files
committed
Fix test header and imports
1 parent d850f6b commit 5ac8a31

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

library/std/src/sys/unix/process/process_unix.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ use crate::fmt;
33
use crate::io::{self, Error, ErrorKind};
44
use crate::mem;
55
use crate::ptr;
6-
use crate::sync::atomic::{AtomicBool, Ordering};
76
use crate::sys;
87
use crate::sys::cvt;
98
use crate::sys::process::process_common::*;
10-
use crate::sys_common::FromInner;
119

1210
#[cfg(target_os = "linux")]
1311
use crate::os::linux::process::PidFd;
@@ -16,7 +14,7 @@ use crate::os::linux::process::PidFd;
1614
use libc::RTP_ID as pid_t;
1715

1816
#[cfg(not(target_os = "vxworks"))]
19-
use libc::{c_int, c_long, gid_t, pid_t, uid_t};
17+
use libc::{c_int, gid_t, pid_t, uid_t};
2018

2119
////////////////////////////////////////////////////////////////////////////////
2220
// Command
@@ -132,6 +130,7 @@ impl Command {
132130
// If this fails, we will fall through this block to a call to `fork()`
133131
#[cfg(target_os = "linux")]
134132
{
133+
use crate::sync::atomic::{AtomicBool, Ordering};
135134
static HAS_CLONE3: AtomicBool = AtomicBool::new(true);
136135

137136
const CLONE_PIDFD: u64 = 0x00001000;
@@ -152,7 +151,7 @@ impl Command {
152151
}
153152

154153
syscall! {
155-
fn clone3(cl_args: *mut clone_args, len: libc::size_t) -> c_long
154+
fn clone3(cl_args: *mut clone_args, len: libc::size_t) -> libc::c_long
156155
}
157156

158157
if HAS_CLONE3.load(Ordering::Relaxed) {
@@ -529,6 +528,7 @@ pub struct Process {
529528
impl Process {
530529
#[cfg(target_os = "linux")]
531530
fn new(pid: pid_t, pidfd: pid_t) -> Self {
531+
use crate::sys_common::FromInner;
532532
let pidfd = (pidfd >= 0).then(|| PidFd::from_inner(sys::fd::FileDesc::new(pidfd)));
533533
Process { pid, status: None, pidfd }
534534
}

src/test/ui/command/command-create-pidfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
// linux-only - pidfds are a linux-specific concept
2+
// only-linux - pidfds are a linux-specific concept
33

44
#![feature(linux_pidfd)]
55
use std::os::linux::process::{CommandExt, ChildExt};

0 commit comments

Comments
 (0)