# std.os: add missing mmap errors · gitcafe/zig

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

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

Visibility: public

Requested revision: 06b263825a67e68cec128c640a6287fa1716dc63

Requested commit: 06b263825a67e68cec128c640a6287fa1716dc63

Commit: 06b263825a67e68cec128c640a6287fa1716dc63

Tree: f9f3d68397896b22051241785620a2baa08e3f90

Author: Jan Philipp Hafer

Committer: Andrew Kelley

## Message

```
std.os: add missing mmap errors

Man page for posix lists EMFILE, man page for linux ENFILE.
Also posix says "The mmap() function adds an extra reference to the file
associated with the file descriptor fildes which is not removed by a
subsequent close() on that file descriptor. This reference is removed
when there are no more mappings to the file."

It sounds counter-intuitive, that a process limit but no system limit can
be exceeeded.

As far as I understand, fildes is only used for file descriptor backed mmaps.

```

## Parents

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

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