]> git.proxmox.com Git - rustc.git/blame - vendor/rustix/src/process/mod.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / vendor / rustix / src / process / mod.rs
CommitLineData
064997fb
FG
1//! Process-associated operations.
2
3#[cfg(not(target_os = "wasi"))]
4mod chdir;
5mod exit;
6#[cfg(not(target_os = "wasi"))] // WASI doesn't have get[gpu]id.
7mod id;
8#[cfg(not(target_os = "wasi"))]
9mod kill;
10#[cfg(any(target_os = "android", target_os = "linux"))]
11mod membarrier;
487cf647
FG
12#[cfg(any(target_os = "android", target_os = "linux"))]
13mod prctl;
064997fb
FG
14#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] // WASI doesn't have [gs]etpriority.
15mod priority;
487cf647
FG
16#[cfg(target_os = "freebsd")]
17mod procctl;
064997fb
FG
18#[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
19mod rlimit;
20#[cfg(any(
21 target_os = "android",
22 target_os = "dragonfly",
23 target_os = "fuchsia",
24 target_os = "linux",
25))]
26mod sched;
27mod sched_yield;
28#[cfg(not(target_os = "wasi"))] // WASI doesn't have uname.
29mod uname;
30#[cfg(not(target_os = "wasi"))]
31mod wait;
32
33#[cfg(not(target_os = "wasi"))]
34pub use chdir::chdir;
35#[cfg(not(any(target_os = "wasi", target_os = "fuchsia")))]
36pub use chdir::fchdir;
37#[cfg(not(target_os = "wasi"))]
38pub use chdir::getcwd;
39#[cfg(not(target_os = "wasi"))]
40pub use exit::EXIT_SIGNALED_SIGABRT;
41pub use exit::{EXIT_FAILURE, EXIT_SUCCESS};
42#[cfg(any(target_os = "android", target_os = "linux"))]
43pub use id::Cpuid;
44#[cfg(not(target_os = "wasi"))]
45pub use id::{
487cf647
FG
46 getegid, geteuid, getgid, getpgid, getpgrp, getpid, getppid, getuid, setsid, Gid, Pid, RawGid,
47 RawNonZeroPid, RawPid, RawUid, Uid,
064997fb
FG
48};
49#[cfg(not(target_os = "wasi"))]
50pub use kill::{kill_current_process_group, kill_process, kill_process_group, Signal};
51#[cfg(any(target_os = "android", target_os = "linux"))]
52pub use membarrier::{
53 membarrier, membarrier_cpu, membarrier_query, MembarrierCommand, MembarrierQuery,
54};
487cf647
FG
55#[cfg(any(target_os = "android", target_os = "linux"))]
56pub use prctl::*;
064997fb
FG
57#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))]
58pub use priority::nice;
59#[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
60pub use priority::{
61 getpriority_pgrp, getpriority_process, getpriority_user, setpriority_pgrp, setpriority_process,
62 setpriority_user,
63};
487cf647
FG
64#[cfg(target_os = "freebsd")]
65pub use procctl::*;
064997fb
FG
66#[cfg(any(target_os = "android", target_os = "linux"))]
67pub use rlimit::prlimit;
68#[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
69pub use rlimit::{getrlimit, setrlimit, Resource, Rlimit};
70#[cfg(any(
71 target_os = "android",
72 target_os = "dragonfly",
73 target_os = "fuchsia",
74 target_os = "linux",
75))]
76pub use sched::{sched_getaffinity, sched_setaffinity, CpuSet};
77pub use sched_yield::sched_yield;
78#[cfg(not(target_os = "wasi"))]
79pub use uname::{uname, Uname};
80#[cfg(not(target_os = "wasi"))]
81pub use wait::{wait, waitpid, WaitOptions, WaitStatus};
82
83#[cfg(not(target_os = "wasi"))]
487cf647 84#[cfg(feature = "fs")]
064997fb 85pub(crate) use id::translate_fchown_args;