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

Gerard Ziemski gziemski at openjdk.org
Tue Jan 23 16:18:42 UTC 2024


On Wed, 10 Jan 2024 21:49:23 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`.

This pull request has now been integrated.

Changeset: 3d823636
Author:    Gerard Ziemski <gziemski at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3d8236367d695976946d267ee62f4a26879731ac
Stats:     29 lines in 1 file changed: 9 ins; 0 del; 20 mod

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

Reviewed-by: dholmes, fparain, dcubed

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

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


More information about the hotspot-runtime-dev mailing list