mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-06 23:02:10 +03:00
getdtablesize: fix returning hard instead of soft rlimit
This makes the result consistent with sysconf(_SC_OPEN_MAX).
This commit is contained in:
parent
c1f4ed1501
commit
397586625e
@ -7,5 +7,5 @@ int getdtablesize(void)
|
||||
{
|
||||
struct rlimit rl;
|
||||
getrlimit(RLIMIT_NOFILE, &rl);
|
||||
return rl.rlim_max < INT_MAX ? rl.rlim_max : INT_MAX;
|
||||
return rl.rlim_cur < INT_MAX ? rl.rlim_cur : INT_MAX;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user