aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-08 22:05:59 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-08 22:05:59 -0800
commitbf92c36be1e6c9beaf7f74a1e83f80135b096b0e (patch)
tree1a5e00e859b230338ee7b68f7c7d3ee25f2ce0be
parent253cb391b3de277ff1e77d58a14ec8601de858a3 (diff)
downloadbun-bf92c36be1e6c9beaf7f74a1e83f80135b096b0e.tar.gz
bun-bf92c36be1e6c9beaf7f74a1e83f80135b096b0e.tar.zst
bun-bf92c36be1e6c9beaf7f74a1e83f80135b096b0e.zip
Fixes #1320
Tests pass now on linux
-rw-r--r--src/bun.js/api/bun/subprocess.zig3
1 files changed, 2 insertions, 1 deletions
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;
}
}