RFR: 8300088: [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE [v4]
Daniel D. Daugherty
dcubed at openjdk.org
Fri Jan 19 17:36:28 UTC 2024
On Fri, 19 Jan 2024 16:11:59 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> On current macOS (> 10.6) we can use `RLIM_INFINITY` for `setrlimit(RLIMIT_NOFILE)`, even though the man page for setrlimit(2) claims otherwise.
>>
>> The only wrinkle here is that some terminals (ksh) will crash with `RLIM_INFINITY`, because that value overflows `int` type, which they use internally, causing crash, so we work around that by using `INT_MAX` instead of `RLIM_INFINITY`.
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>
> Dan's feedback
Thumbs up.
Does this: `OPEN_MAX: 10240` mean that the JVM is limited to that few open
file descriptors on the macOS releases with that value? Just confirming my
understanding...
-------------
Marked as reviewed by dcubed (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17361#pullrequestreview-1833329448
PR Comment: https://git.openjdk.org/jdk/pull/17361#issuecomment-1900815676
More information about the hotspot-runtime-dev
mailing list