mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 03:03:09 +00:00
On Darwin, according to the man pages for setrlimit(), when adjusting max number of open fds, the reported hard max by getrlimit() is only theoretical, while the actual maximum, set in the kernel, is hardcoded in the header file. Therefore, the reported max has to be adjusted as `min(OPEN_MAX, lim.max)`. Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>