projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1f4ed1
)
getdtablesize: fix returning hard instead of soft rlimit
author
Olivier Brunel
<jjk@jjacky.com>
Sat, 13 Aug 2016 18:31:49 +0000
(20:31 +0200)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 30 Aug 2016 20:15:22 +0000
(16:15 -0400)
This makes the result consistent with sysconf(_SC_OPEN_MAX).
src/legacy/getdtablesize.c
patch
|
blob
|
history
diff --git
a/src/legacy/getdtablesize.c
b/src/legacy/getdtablesize.c
index 682da6d067583f4382d9b1f2accc8115e66af3ab..b30c1933a272d13b3d7918afd053dcd328d700c2 100644
(file)
--- a/
src/legacy/getdtablesize.c
+++ b/
src/legacy/getdtablesize.c
@@
-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;
}