Kevin Cernekee wrote:
@@ -99,8 +99,8 @@ rpl_getdtablesize(void)
a smaller soft limit, the smaller limit is not enforced, so
we might as well just report the hard limit. */
struct rlimit lim;
- if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_max != RLIM_INFINITY)
- return lim.rlim_max;
+ if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_cur != RLIM_INFINITY)
+ return lim.rlim_cur;
return getdtablesize ();
}
This one doesn't look right, as it causes the code to disagree with the
preceding comment. Doesn't the patch lose a Cygwin fix? That is, shouldn't the
code do one thing on Cygwin, and another on other platforms where rlim_cur
presumably works?