This commit is contained in:
Ian Douglas Scott
2017-06-28 22:06:54 -07:00
parent 96d5656ef9
commit 1fc8732fc2
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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) }
+1
View File
@@ -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;