mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: on linux-arm64, prefer prlimit to {g,s}etrlimit
Do the same as CL 230339 did for package syscall: Reportedly some Docker images accept the prlimit64 system call, used by syscall.prlimit, but prohibit the getrlimit and setrlimit system calls. Updates golang/go#38604 Change-Id: I4fc9197d7b037c2f375e50b149701316a36023f3 Reviewed-on: https://go-review.googlesource.com/c/sys/+/230478 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
29b5707901
commit
3771e69a9a
@@ -151,7 +151,7 @@ func Getgid() (gid int) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
func getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
@@ -307,7 +307,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
func setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
|
||||
Reference in New Issue
Block a user