authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 17:56:33 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 17:56:33 -07:00
log4ec3cd0df043f9164909426bd781e05e98e06ca4
treec6e1cbbceaad50d76592a7ce3af36e3ba3330d29
parent77efa9c90558b2c8e2e2701c9547ff24ecd96587
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add pipe2


1 files changed, 8 insertions(+), 0 deletions(-)

nfs.zig+8
...@@ -68,3 +68,11 @@ pub fn mktemp(flags: Dir.CreateFlags) !File {...@@ -68,3 +68,11 @@ pub fn mktemp(flags: Dir.CreateFlags) !File {
68 const path = template[0 .. template.len - 1 :0];68 const path = template[0 .. template.len - 1 :0];
69 return cwd().createFile(path, flags);69 return cwd().createFile(path, flags);
70}70}
71
72pub fn pipe2(flag: c_int) ![2]File {
73 const fds = try sys.pipe2(flag);
74 return .{
75 .{ .fd = @enumFromInt(fds[0]) },
76 .{ .fd = @enumFromInt(fds[1]) },
77 };
78}