Fix rlimit setting of RLIM_NOFILE on OSX (#14054)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 19 Sep 2017 21:48:35 +0000 (23:48 +0200)
committerGitHub <noreply@github.com>
Tue, 19 Sep 2017 21:48:35 +0000 (23:48 +0200)
commita94de3bc4448d3b71df515ad22d94698c235341f
tree505785c4605b15a1d810fca91e5e3b4de3415a2f
parentebda95e5258b2e0fe1fe0c2cf66c443dba858743
Fix rlimit setting of RLIM_NOFILE on OSX (#14054)

This change fixes an issue with rlimit setting of RLIM_NOFILE. The problem
is that the rlim_max that we get from getrlimit is too large and so setting
the rlimit_cur to that value fails. The OSX man page for rlimit has a compat
note about it, stating that the rlimit_cur needs to be limited to
min(OPEN_MAX, rlim_max) if one wants to set it to rlim_max.
src/pal/src/file/file.cpp
src/pal/src/init/pal.cpp