You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use nix::sys::signal::{selfas nix_signal,SigHandler,Signal};
14
8
use nix::unistd::Pid;
15
9
use std::io;
@@ -20,61 +14,6 @@ use std::sync::atomic::AtomicBool;
20
14
use std::thread;
21
15
use std::time::{Duration,Instant};
22
16
23
-
/// `geteuid()` returns the effective user ID of the calling process.
24
-
pubfngeteuid() -> uid_t{
25
-
nix::unistd::geteuid().as_raw()
26
-
}
27
-
28
-
/// `getpgrp()` returns the process group ID of the calling process.
29
-
/// It is a trivial wrapper over nix::unistd::getpgrp.
30
-
pubfngetpgrp() -> pid_t{
31
-
nix::unistd::getpgrp().as_raw()
32
-
}
33
-
34
-
/// `getegid()` returns the effective group ID of the calling process.
35
-
pubfngetegid() -> gid_t{
36
-
nix::unistd::getegid().as_raw()
37
-
}
38
-
39
-
/// `getgid()` returns the real group ID of the calling process.
40
-
pubfngetgid() -> gid_t{
41
-
nix::unistd::getgid().as_raw()
42
-
}
43
-
44
-
/// `getuid()` returns the real user ID of the calling process.
45
-
pubfngetuid() -> uid_t{
46
-
rustix::process::getuid().as_raw()
47
-
}
48
-
49
-
/// `getpid()` returns the pid of the calling process.
50
-
pubfngetpid() -> pid_t{
51
-
nix::unistd::getpid().as_raw()
52
-
}
53
-
54
-
/// `getsid()` returns the session ID of the process with process ID pid.
55
-
///
56
-
/// If pid is 0, getsid() returns the session ID of the calling process.
57
-
///
58
-
/// # Error
59
-
///
60
-
/// - [Errno::EPERM] A process with process ID pid exists, but it is not in the same session as the calling process, and the implementation considers this an error.
61
-
/// - [Errno::ESRCH] No process with process ID pid was found.
62
-
///
63
-
///
64
-
/// # Platform
65
-
///
66
-
/// This function only support standard POSIX implementation platform,
67
-
/// so some system such as redox doesn't supported.
0 commit comments