diff options
author | 2020-10-29 08:42:10 -0400 | |
---|---|---|
committer | 2020-10-29 08:42:10 -0400 | |
commit | 25240e13cf9c4a0fc1586194754fb4f7e9231bd7 (patch) | |
tree | 39075d60745966bae1075cd84df4f51d41da933e /lib_pypy | |
parent | only compile my_prlimit header on Linux (diff) | |
download | pypy-25240e13cf9c4a0fc1586194754fb4f7e9231bd7.tar.gz pypy-25240e13cf9c4a0fc1586194754fb4f7e9231bd7.tar.bz2 pypy-25240e13cf9c4a0fc1586194754fb4f7e9231bd7.zip |
my_prlimit -> _prlimit (in _resource_build)
Diffstat (limited to 'lib_pypy')
-rw-r--r-- | lib_pypy/_resource_build.py | 4 | ||||
-rw-r--r-- | lib_pypy/resource.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib_pypy/_resource_build.py b/lib_pypy/_resource_build.py index 7044bae9a3..511e52ead2 100644 --- a/lib_pypy/_resource_build.py +++ b/lib_pypy/_resource_build.py @@ -75,7 +75,7 @@ static int my_setrlimit(int resource, long long cur, long long max) } #ifdef __linux__ -static int my_prlimit(int pid, int resource, int set, long long cur, long long max, long long result[2]) +static int _prlimit(int pid, int resource, int set, long long cur, long long max, long long result[2]) { struct rlimit new_rl, old_rl; new_rl.rlim_cur = cur & RLIM_INFINITY; @@ -133,7 +133,7 @@ int wait4(int pid, int *status, int options, struct rusage *rusage); if sys.platform.startswith("linux"): ffi.cdef(""" -int my_prlimit(int pid, int resource, int set, long long cur, long long max, long long result[2]); +int _prlimit(int pid, int resource, int set, long long cur, long long max, long long result[2]); """) if __name__ == "__main__": diff --git a/lib_pypy/resource.py b/lib_pypy/resource.py index c226e319ce..ece7baf1e5 100644 --- a/lib_pypy/resource.py +++ b/lib_pypy/resource.py @@ -121,7 +121,7 @@ if sys.platform.startswith("linux"): result = ffi.new("long long[2]") - if lib.my_prlimit(pid, resource, limits is not None, limit0, limit1, result) == -1: + if lib._prlimit(pid, resource, limits is not None, limit0, limit1, result) == -1: if ffi.errno == EINVAL: raise ValueError("current limit exceeds maximum limit") elif ffi.errno == EPERM: |