From bf92c36be1e6c9beaf7f74a1e83f80135b096b0e Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Tue, 8 Nov 2022 22:05:59 -0800 Subject: Fixes #1320 Tests pass now on linux --- src/bun.js/api/bun/subprocess.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/bun.js') diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index 649e3b3d2..1eba6acf6 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -553,7 +553,8 @@ pub const Subprocess = struct { // we consider a short read as being EOF this.received_eof = this.received_eof or bytes_read < buf.len; if (this.received_eof) { - this.autoCloseFileDescriptor(); + // do not auto-close the file descriptor here + // it's totally legit to have a short read return; } } -- cgit v1.2.3