Skip to content

Win32 Unix: map ERROR_TOO_MANY_LINKS to EMLINK - #11991

Merged
dra27 merged 2 commits into
ocaml:trunkfrom
nojb:nojebar_EMLINK
Feb 4, 2023
Merged

dra27 merged 2 commits into
ocaml:trunkfrom
nojb:nojebar_EMLINK

Conversation

@nojb

@nojb nojb commented Feb 4, 2023

Copy link
Copy Markdown
Contributor

Map the Win32 error code ERROR_TOO_MANY_LINKS to the POSIX code EMLINK.

https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--1000-1299-

This error code can be returned by Unix.link. You can trigger it by doing

# close_out (open_out "a.0");;
- : unit = ()
# for i = 1 to 100000 do Unix.link "a.0" ("a." ^ string_of_int i) done;;
Exception: Unix.Unix_error(Unix.EMLINK, "link", "a.1024")

@gasche gasche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly correct, approved.

@gasche gasche added the merge-me label Feb 4, 2023
@dra27
dra27 merged commit 5b15b5a into ocaml:trunk Feb 4, 2023
@nojb
nojb deleted the nojebar_EMLINK branch February 4, 2023 10:59
@nojb

nojb commented Feb 4, 2023

Copy link
Copy Markdown
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants