From 21bf3ddaf23c842dc12a1d76dbd3b48daf08f349 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 12 Nov 2022 18:30:12 -0800 Subject: Redo how we poll pipes (#1496) * Fix pipe * Handle unregistered * Fix failing test --- src/bun.js/node/node_fs.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/bun.js/node/node_fs.zig') diff --git a/src/bun.js/node/node_fs.zig b/src/bun.js/node/node_fs.zig index 23596d7b5..ff9f1ba1f 100644 --- a/src/bun.js/node/node_fs.zig +++ b/src/bun.js/node/node_fs.zig @@ -1823,7 +1823,7 @@ const Arguments = struct { .file = undefined, .global_object = ctx.ptr(), }; - var fd: FileDescriptor = std.math.maxInt(FileDescriptor); + var fd: FileDescriptor = JSC.Node.invalid_fd; if (arguments.next()) |arg| { arguments.eat(); @@ -1918,7 +1918,7 @@ const Arguments = struct { } } - if (fd != std.math.maxInt(FileDescriptor)) { + if (fd != JSC.Node.invalid_fd) { stream.file = .{ .fd = fd }; } else if (path) |path_| { stream.file = .{ .path = path_ }; @@ -1957,7 +1957,7 @@ const Arguments = struct { .file = undefined, .global_object = ctx.ptr(), }; - var fd: FileDescriptor = std.math.maxInt(FileDescriptor); + var fd: FileDescriptor = JSC.Node.invalid_fd; if (arguments.next()) |arg| { arguments.eat(); @@ -2044,7 +2044,7 @@ const Arguments = struct { } } - if (fd != std.math.maxInt(FileDescriptor)) { + if (fd != JSC.Node.invalid_fd) { stream.file = .{ .fd = fd }; } else if (path) |path_| { stream.file = .{ .path = path_ }; -- cgit v1.2.3