diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-02-20 17:58:29 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 17:58:29 +0530 |
commit | 8fdd65556299efa58512467b4d19d2612441d376 (patch) | |
tree | a62bf2cdba306749444c7fa0215cc0b55f13d0a8 /ext/node/polyfills/internal/child_process.ts | |
parent | 123653a01adfa0b07d3f202bc9a084738b4775fe (diff) |
fix(ext/node): unimplemented code when not IPC child_process (#22488)
Fixes https://github.com/denoland/deno/issues/22299
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 584f6af11..62de6a098 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -300,7 +300,9 @@ export class ChildProcess extends EventEmitter { } /* Cancel any pending IPC I/O */ - this.disconnect?.(); + if (this.implementsDisconnect) { + this.disconnect?.(); + } this.killed = true; this.signalCode = denoSignal; @@ -1148,6 +1150,7 @@ export function setupChannel(target, ipc) { target.emit("disconnect"); }); }; + target.implementsDisconnect = true; // Start reading messages from the channel. readLoop(); |