diff options
author | 2022-11-24 02:41:14 -0800 | |
---|---|---|
committer | 2022-11-24 02:41:14 -0800 | |
commit | 1be13fa192fa9ca638f04e5ff6954e7d9cb3dd7e (patch) | |
tree | 4d61f5a0627302b1f30b88d079800d8121702e1f /src | |
parent | 46094189f44cc94235e999e261c424ab24a79dd8 (diff) | |
download | bun-1be13fa192fa9ca638f04e5ff6954e7d9cb3dd7e.tar.gz bun-1be13fa192fa9ca638f04e5ff6954e7d9cb3dd7e.tar.zst bun-1be13fa192fa9ca638f04e5ff6954e7d9cb3dd7e.zip |
Update streams.zig
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/webcore/streams.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig index 3e06717bf..771bf0cbf 100644 --- a/src/bun.js/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -3738,13 +3738,15 @@ pub const FIFO = struct { switch (Syscall.read(this.fd, buf)) { .err => |err| { const retry = std.os.E.AGAIN; - const errno = brk: { + const errno: std.os.E = brk: { const _errno = err.getErrno(); + if (comptime Environment.isLinux) { - // EPERM and its a FIFO on Linux? Trying to read past a FIFO which has already - // sent a 0 - // Let's retry later. - break :brk .AGAIN; + if (_errno == .PERM) + // EPERM and its a FIFO on Linux? Trying to read past a FIFO which has already + // sent a 0 + // Let's retry later. + return .{ .pending = {} }; } break :brk _errno; |