zig icon indicating copy to clipboard operation
zig copied to clipboard

std.os: handle EPERM errno for bind

Open mllken opened this issue 2 years ago • 1 comments
trafficstars

Handle the EPERM error in the os.bind function, which can happen when binding AF_NETLINK sockets as non-root on Linux.

Return error.AccessDenied instead of error.PermissionDenied, as this seems to be the more common return convention for EPERM in os.zig.

mllken avatar Mar 14 '23 07:03 mllken

Not sure that I understand the build failure (non-determinism introduced?)

mllken avatar Mar 14 '23 13:03 mllken

Not sure that I understand the build failure (non-determinism introduced?)

Error is unrelated to your PR as it appears during compilation of Zig itself (which does not use bind). See #14932.

matu3ba avatar Mar 16 '23 09:03 matu3ba