re-add iov in file so PipeReader compile

This commit is contained in:
cirospaciari
2024-02-20 12:07:38 -03:00
parent c9dace0677
commit 259d793777

View File

@@ -13,6 +13,7 @@ pub const Source = union(enum) {
const Tty = uv.uv_tty_t;
const File = struct {
fs: uv.fs_t,
iov: uv.uv_buf_t,
file: uv.uv_file,
};
@@ -79,22 +80,6 @@ pub const Source = union(enum) {
}
}
pub fn isClosed(this: Source) bool {
switch (this) {
.pipe => |pipe| return pipe.isClosed(),
.tty => |tty| return tty.isClosed(),
.file => |file| return file.file == -1,
}
}
pub fn isActive(this: Source) bool {
switch (this) {
.pipe => |pipe| return pipe.isActive(),
.tty => |tty| return tty.isActive(),
.file => return false,
}
}
pub fn openPipe(loop: *uv.Loop, fd: bun.FileDescriptor, ipc: bool) bun.JSC.Maybe(*Source.Pipe) {
log("openPipe (fd = {})", .{fd});
const pipe = bun.default_allocator.create(Source.Pipe) catch bun.outOfMemory();