about summary refs log tree commit diff
path: root/src/misc/getrlimit.c
Commit message (Collapse)AuthorAgeFilesLines
* only use getrlimit/setrlimit syscalls if they existStefan O'Rear2022-05-011-1/+5
| | | | riscv32 and future architectures only provide prlimit64.
* remove spurious inclusion of libc.h for LFS64 ABI aliasesRich Felker2018-09-121-2/+1
| | | | | | the LFS64 macro was not self-documenting and barely saved any characters. simply use weak_alias directly so that it's clear what's being done, and doesn't depend on a header to provide a strange macro.
* fix for broken kernel side RLIM_INFINITY on mipsSzabolcs Nagy2014-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | On 32 bit mips the kernel uses -1UL/2 to mark RLIM_INFINITY (and this is the definition in the userspace api), but since it is in the middle of the valid range of limits and limits are often compared with relational operators, various kernel side logic is broken if larger than -1UL/2 limits are used. So we truncate the limits to -1UL/2 in get/setrlimit and prlimit. Even if the kernel side logic consistently treated -1UL/2 as greater than any other limit value, there wouldn't be any clean workaround that allowed using large limits: * using -1UL/2 as RLIM_INFINITY in userspace would mean different infinity value for get/setrlimt and prlimit (where infinity is always -1ULL) and userspace logic could break easily (just like the kernel is broken now) and more special case code would be needed for mips. * translating -1UL/2 kernel side value to -1ULL in userspace would mean that -1UL/2 limit cannot be set (eg. -1UL/2+1 had to be passed to the kernel instead).
* use prlimit syscall for getrlimit/setrlimitRich Felker2012-01-201-3/+7
| | | | | | this allows the full range of 64-bit limit arguments even on 32-bit systems. fallback to the old syscalls on old kernels that don't support prlimit.
* global cleanup to use the new syscall interfaceRich Felker2011-03-201-1/+1
|
* fix getrlimit handling on 32-bit systems, and ease porting to 64-bitRich Felker2011-02-151-3/+3
|
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+15