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

Gerard Ziemski gziemski at openjdk.org
Fri Jan 12 20:09:34 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:

  David's feedback

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

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

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

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