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