diff options
author | 2022-11-25 00:11:02 -0800 | |
---|---|---|
committer | 2022-11-25 00:11:02 -0800 | |
commit | ce2cdb44e1ec7182c0177737e4cbda956ff31702 (patch) | |
tree | ce43468669fe726331e0338a8a2121fb5ef664aa | |
parent | 348ad8701360fbbe6ec6359360d236bef10e688a (diff) | |
download | bun-ce2cdb44e1ec7182c0177737e4cbda956ff31702.tar.gz bun-ce2cdb44e1ec7182c0177737e4cbda956ff31702.tar.zst bun-ce2cdb44e1ec7182c0177737e4cbda956ff31702.zip |
Use new enum for checking writable
-rw-r--r-- | src/bun.js/api/bun/subprocess.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bun.js/api/bun/subprocess.zig b/src/bun.js/api/bun/subprocess.zig index 633e12d19..43cb5cbd9 100644 --- a/src/bun.js/api/bun/subprocess.zig +++ b/src/bun.js/api/bun/subprocess.zig @@ -365,7 +365,7 @@ pub const Subprocess = struct { // we do this rather than epoll or kqueue() // because we don't want to block the thread waiting for the write switch (bun.isWritable(this.fd)) { - .writable => { + .ready => { if (this.poll_ref) |poll_ref| { poll_ref.flags.insert(.writable); poll_ref.flags.insert(.fifo); @@ -376,7 +376,7 @@ pub const Subprocess = struct { this.deinit(); return; }, - .not_writable => { + .not_ready => { if (!this.isWatching()) this.watch(this.fd); return; }, @@ -511,7 +511,7 @@ pub const Subprocess = struct { } pub fn canRead(this: *BufferedOutput) bool { - return bun.isReadable(this.fifo.fd); + return bun.isReadable(this.fifo.fd) == .ready; } pub fn onRead(this: *BufferedOutput, result: JSC.WebCore.StreamResult) void { |