diff options
author | 2022-10-11 13:53:31 -0700 | |
---|---|---|
committer | 2022-10-11 13:53:31 -0700 | |
commit | 888a685e26e035f7261aaa8727506ec4e9b80714 (patch) | |
tree | e47fd761640a757e80ace2b8328b1548a360acdc | |
parent | 51c1d18e689b9180e85df9f91f9bda4e34654b44 (diff) | |
download | bun-888a685e26e035f7261aaa8727506ec4e9b80714.tar.gz bun-888a685e26e035f7261aaa8727506ec4e9b80714.tar.zst bun-888a685e26e035f7261aaa8727506ec4e9b80714.zip |
Maybe fix linux bug?
Diffstat (limited to '')
-rw-r--r-- | src/bun.js/api/bun/subprocess.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index f30995532..0444ef927 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -1180,7 +1180,9 @@ pub const Subprocess = struct { const idx: usize = if (std_fileno == 0) 0 else 1; try actions.dup2(pipe_fd[idx], std_fileno); - try actions.close(pipe_fd[1 - idx]); + + if (comptime Environment.isMac) + try actions.close(pipe_fd[1 - idx]); }, .fd => |fd| { try actions.dup2(fd, std_fileno); @@ -1196,6 +1198,7 @@ pub const Subprocess = struct { try actions.dup2(std_fileno, std_fileno); } }, + .ignore => { const flag = if (std_fileno == std.os.STDIN_FILENO) @as(u32, os.O.RDONLY) else @as(u32, std.os.O.WRONLY); try actions.openZ(std_fileno, "/dev/null", flag, 0o664); |