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:08:47 UTC 2024


> 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:

  ksh bug affects all BSD platforms

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17361/files
  - new: https://git.openjdk.org/jdk/pull/17361/files/26334469..a755233b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17361&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17361&range=00-01

  Stats: 10 lines in 1 file changed: 2 ins; 6 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/17361.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17361/head:pull/17361

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


More information about the hotspot-runtime-dev mailing list