mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: make Prlimit public
glibc has a wrapper for it, so why shouldn't we? Change-Id: I5c6e24c8e567e0198ea679f0be33e2eff056d5ed Reviewed-on: https://go-review.googlesource.com/c/sys/+/332029 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
d867a43fc9
commit
30e4713e60
@@ -184,7 +184,7 @@ const rlimInf32 = ^uint32(0)
|
||||
const rlimInf64 = ^uint64(0)
|
||||
|
||||
func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
err = prlimit(0, resource, nil, rlim)
|
||||
err = Prlimit(0, resource, nil, rlim)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
@@ -212,7 +212,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
|
||||
|
||||
func Setrlimit(resource int, rlim *Rlimit) (err error) {
|
||||
err = prlimit(0, resource, rlim, nil)
|
||||
err = Prlimit(0, resource, rlim, nil)
|
||||
if err != ENOSYS {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user