# Fix Darwin codepath · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/8dda64fa3e1d3249baa948dc0558e3f65d71e6df)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 8dda64fa3e1d3249baa948dc0558e3f65d71e6df

Requested commit: 8dda64fa3e1d3249baa948dc0558e3f65d71e6df

Commit: 8dda64fa3e1d3249baa948dc0558e3f65d71e6df

Tree: beceee28f51886280f8ede8caffb1475ad5e3edf

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
Fix Darwin codepath

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>

```

## Parents

- [06b4526a3e15d776437cdcf45d76ed34c6c39272](https://git.cafe/gitcafe/zig/commit/06b4526a3e15d776437cdcf45d76ed34c6c39272?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/8dda64fa3e1d3249baa948dc0558e3f65d71e6df?format=markdown)
