feature. See also
. The project being documented here (as the example) is the Zig library itself.
Uring.setUpChildIo
fn setUpChildIo(
sync: *CancelRegion.Sync,
stdio: process.SpawnOptions.StdIo,
pipe_fd: fd_t,
std_fileno: i32,
dev_null_fd: fd_t,
) !void
File
Code
fn setUpChildIo(
sync: *CancelRegion.Sync,
stdio: process.SpawnOptions.StdIo,
pipe_fd: fd_t,
std_fileno: i32,
dev_null_fd: fd_t,
) !void {
switch (stdio) {
.pipe => try dup2(sync, pipe_fd, std_fileno),
.close => _ = linux.close(std_fileno),
.inherit => {},
.ignore => try dup2(sync, dev_null_fd, std_fileno),
.file => |file| try dup2(sync, file.handle, std_fileno),
}
}