Error Set SendfileError [src]
Errors
out_fd is an unconnected socket, or out_fd closed its read end.
Unspecified error while reading from in_fd.
Insufficient kernel memory to read from in_fd.
The Operating System returned an undocumented error code.
This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.
When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.
offset is not null but the input file is not seekable.
Descriptor is not valid or locked, or an mmap(2)-like operation is not available for in_fd.
Nonblocking I/O has been selected but the write would block.
Source
pub const SendfileError = std.posix.UnexpectedError || error{
/// `out_fd` is an unconnected socket, or out_fd closed its read end.
BrokenPipe,
/// Descriptor is not valid or locked, or an mmap(2)-like operation is not available for in_fd.
UnsupportedOperation,
/// Nonblocking I/O has been selected but the write would block.
WouldBlock,
/// Unspecified error while reading from in_fd.
InputOutput,
/// Insufficient kernel memory to read from in_fd.
SystemResources,
/// `offset` is not `null` but the input file is not seekable.
Unseekable,
}