RFR: 8291060: OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE [v2]

Gerard Ziemski gziemski at openjdk.org
Wed Jul 27 15:53:07 UTC 2022


On Wed, 27 Jul 2022 06:57:21 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Hi Gerard,
> 
> General approach is fine. A couple of nits/suggestions.
> 
> Thanks.

Thank you for the review and feedback!

> src/hotspot/os/bsd/os_bsd.cpp line 1997:
> 
>> 1995:       status = setrlimit(RLIMIT_NOFILE, &nbr_files);
>> 1996: #ifdef __APPLE__
>> 1997:       if (status != 0) {
> 
> Should this be
> 
> `if (status != 0 && errno == EINVAL)`
> 
> so that any other error still gets logged?

Good catch, done.

> src/hotspot/os/bsd/os_bsd.cpp line 2004:
> 
>> 2002:         status = setrlimit(RLIMIT_NOFILE, &nbr_files);
>> 2003:       }
>> 2004: #endif // #ifdef __APPLE__
> 
> Nit: don't include #ifdef in the #endif comment

Done.

-------------

PR: https://git.openjdk.org/jdk/pull/9650


More information about the hotspot-runtime-dev mailing list