getppid
This commit is contained in:
@@ -161,6 +161,11 @@ pub fn getpid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETPID) }
|
||||
}
|
||||
|
||||
/// Get the parent process ID
|
||||
pub fn getppid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETPPID) }
|
||||
}
|
||||
|
||||
/// Get the current user ID
|
||||
pub fn getuid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETUID) }
|
||||
|
||||
@@ -46,6 +46,7 @@ pub const SYS_GETEUID: usize = 201;
|
||||
pub const SYS_GETGID: usize = 200;
|
||||
pub const SYS_GETNS: usize = 950;
|
||||
pub const SYS_GETPID: usize = 20;
|
||||
pub const SYS_GETPPID: usize = 64;
|
||||
pub const SYS_GETUID: usize = 199;
|
||||
pub const SYS_IOPL: usize = 110;
|
||||
pub const SYS_KILL: usize = 37;
|
||||
|
||||
Reference in New Issue
Block a user