| ... | ... | @@ -1191,6 +1191,9 @@ pub const WriteError = error{ |
| 1191 | 1191 | /// This error occurs in Linux if the process being written to |
| 1192 | 1192 | /// no longer exists. |
| 1193 | 1193 | ProcessNotFound, |
| 1194 | /// This error occurs when a device gets disconnected before or mid-flush |
| 1195 | /// while it's being written to - errno(6): No such device or address. |
| 1196 | NoDevice, |
| 1194 | 1197 | } || UnexpectedError; |
| 1195 | 1198 | |
| 1196 | 1199 | /// Write to a file descriptor. |
| ... | ... | @@ -1270,6 +1273,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { |
| 1270 | 1273 | .PIPE => return error.BrokenPipe, |
| 1271 | 1274 | .CONNRESET => return error.ConnectionResetByPeer, |
| 1272 | 1275 | .BUSY => return error.DeviceBusy, |
| 1276 | .NXIO => return error.NoDevice, |
| 1273 | 1277 | else => |err| return unexpectedErrno(err), |
| 1274 | 1278 | } |
| 1275 | 1279 | } |