RFR: 8300088: [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE [v2]
Gerard Ziemski
gziemski at openjdk.org
Thu Jan 11 17:14:24 UTC 2024
On Thu, 11 Jan 2024 04:44:51 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>
>> ksh bug affects all BSD platforms
>
> src/hotspot/os/bsd/os_bsd.cpp line 2057:
>
>> 2055:
>> 2056: status = setrlimit(RLIMIT_NOFILE, &nbr_files);
>> 2057: if (status != 0) {
>
> If status == 0 you will redundantly call setrlimit again at line 2066.
Thank you for the feedback, fixed.
Since ksh exists on all the BSD platforms, not just Darwin, I changed the fix, so that the workaround is always active for all BSD OSes, which simplified the logic and let me fix the redundant call to setrlimit easily.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17361#discussion_r1449161450
More information about the hotspot-runtime-dev
mailing list