RFR: 8300088: [IMPROVE] OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE [v4]

Gerard Ziemski gziemski at openjdk.org
Fri Jan 19 16:11:59 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:

  Dan's feedback

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/17361/files
  - new: https://git.openjdk.org/jdk/pull/17361/files/926a50eb..8d46f344

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

  Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 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