sys_resource: setrlimit implementation proposal.

This commit is contained in:
David Carlier
2023-04-13 20:58:24 +01:00
parent 14009eb1d8
commit f5ee873961
4 changed files with 15 additions and 4 deletions
+4
View File
@@ -267,6 +267,10 @@ impl Pal for Sys {
e(syscall!(GETRLIMIT, resource, rlim)) as c_int
}
unsafe fn setrlimit(resource: c_int, rlimit: *const rlimit) -> c_int {
e(syscall!(SETRLIMIT, resource, rlim)) as c_int
}
fn getsid(pid: pid_t) -> pid_t {
e(unsafe { syscall!(GETSID, pid) }) as pid_t
}