mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Update streams.zig
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user