| ... | @@ -2942,10 +2942,6 @@ pub const AcceptError = error{ | ... | @@ -2942,10 +2942,6 @@ pub const AcceptError = error{ |
| 2942 | /// and accepting from the socket would block. | 2942 | /// and accepting from the socket would block. |
| 2943 | WouldBlock, | 2943 | WouldBlock, |
| 2944 | | 2944 | |
| 2945 | /// Permission to create a socket of the specified type and/or | | |
| 2946 | /// protocol is denied. | | |
| 2947 | PermissionDenied, | | |
| 2948 | | | |
| 2949 | /// An incoming connection was indicated, but was subsequently terminated by the | 2945 | /// An incoming connection was indicated, but was subsequently terminated by the |
| 2950 | /// remote peer prior to accepting the call. | 2946 | /// remote peer prior to accepting the call. |
| 2951 | ConnectionResetByPeer, | 2947 | ConnectionResetByPeer, |
| ... | @@ -4130,12 +4126,14 @@ fn setSockFlags(sock: socket_t, flags: u32) !void { | ... | @@ -4130,12 +4126,14 @@ fn setSockFlags(sock: socket_t, flags: u32) !void { |
| 4130 | var fd_flags = fcntl(sock, F_GETFD, 0) catch |err| switch (err) { | 4126 | var fd_flags = fcntl(sock, F_GETFD, 0) catch |err| switch (err) { |
| 4131 | error.FileBusy => unreachable, | 4127 | error.FileBusy => unreachable, |
| 4132 | error.Locked => unreachable, | 4128 | error.Locked => unreachable, |
| | 4129 | error.PermissionDenied => unreachable, |
| 4133 | else => |e| return e, | 4130 | else => |e| return e, |
| 4134 | }; | 4131 | }; |
| 4135 | fd_flags |= FD_CLOEXEC; | 4132 | fd_flags |= FD_CLOEXEC; |
| 4136 | _ = fcntl(sock, F_SETFD, fd_flags) catch |err| switch (err) { | 4133 | _ = fcntl(sock, F_SETFD, fd_flags) catch |err| switch (err) { |
| 4137 | error.FileBusy => unreachable, | 4134 | error.FileBusy => unreachable, |
| 4138 | error.Locked => unreachable, | 4135 | error.Locked => unreachable, |
| | 4136 | error.PermissionDenied => unreachable, |
| 4139 | else => |e| return e, | 4137 | else => |e| return e, |
| 4140 | }; | 4138 | }; |
| 4141 | } | 4139 | } |
| ... | @@ -4156,12 +4154,14 @@ fn setSockFlags(sock: socket_t, flags: u32) !void { | ... | @@ -4156,12 +4154,14 @@ fn setSockFlags(sock: socket_t, flags: u32) !void { |
| 4156 | var fl_flags = fcntl(sock, F_GETFL, 0) catch |err| switch (err) { | 4154 | var fl_flags = fcntl(sock, F_GETFL, 0) catch |err| switch (err) { |
| 4157 | error.FileBusy => unreachable, | 4155 | error.FileBusy => unreachable, |
| 4158 | error.Locked => unreachable, | 4156 | error.Locked => unreachable, |
| | 4157 | error.PermissionDenied => unreachable, |
| 4159 | else => |e| return e, | 4158 | else => |e| return e, |
| 4160 | }; | 4159 | }; |
| 4161 | fl_flags |= O_NONBLOCK; | 4160 | fl_flags |= O_NONBLOCK; |
| 4162 | _ = fcntl(sock, F_SETFL, fl_flags) catch |err| switch (err) { | 4161 | _ = fcntl(sock, F_SETFL, fl_flags) catch |err| switch (err) { |
| 4163 | error.FileBusy => unreachable, | 4162 | error.FileBusy => unreachable, |
| 4164 | error.Locked => unreachable, | 4163 | error.Locked => unreachable, |
| | 4164 | error.PermissionDenied => unreachable, |
| 4165 | else => |e| return e, | 4165 | else => |e| return e, |
| 4166 | }; | 4166 | }; |
| 4167 | } | 4167 | } |