BUG/MINOR: init: always ensure that global.rlimit_nofile matches actual limits

global.rlimit_nofile contains the mxa number of file descriptors that
can be allocated, except if the user is not allowed to reach this limit,
where it still contains the initially requested value. It is important
that this value always matches what is really configured so that it is
properly reported in the stats and that we can use it later to close
all FDs without wasting time closing impossible FDs.

This fix may be backported to 1.6 and 1.5.
(cherry picked from commit ef6354719b150a22d22e9589f163d47b112f5b20)
(cherry picked from commit d41b8fb254bc081b5f67d30ac01d234babd8c809)
1 file changed