aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/node/node_fs.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-11-12 18:30:12 -0800
committerGravatar GitHub <noreply@github.com> 2022-11-12 18:30:12 -0800
commit21bf3ddaf23c842dc12a1d76dbd3b48daf08f349 (patch)
tree06706104877984e9f083fed7c3278c9d007193cc /src/bun.js/node/node_fs.zig
parent514f2a8eddf1a1d35a33cc096ed7403a79afe36f (diff)
downloadbun-21bf3ddaf23c842dc12a1d76dbd3b48daf08f349.tar.gz
bun-21bf3ddaf23c842dc12a1d76dbd3b48daf08f349.tar.zst
bun-21bf3ddaf23c842dc12a1d76dbd3b48daf08f349.zip
Redo how we poll pipes (#1496)
* Fix pipe * Handle unregistered * Fix failing test
Diffstat (limited to 'src/bun.js/node/node_fs.zig')
-rw-r--r--src/bun.js/node/node_fs.zig8
1 files changed, 4 insertions, 4 deletions
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_ };