Skip to content

Commit 2b65be4

Browse files
committed
fix: remove auto-cleanup from DisposableProcess constructor
DisposableProcess should NOT auto-call dispose() on process 'close' event. This was running cleanup before bash.ts finished reading streams. Dispose is only called explicitly via timeout/abort handlers. Process streams close naturally when process exits, so no forced cleanup is needed.
1 parent 14f3387 commit 2b65be4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/utils/disposableExec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ export class DisposableProcess implements Disposable {
2121
private disposed = false;
2222

2323
constructor(private readonly process: ChildProcess) {
24-
// Auto-cleanup when process exits
25-
process.once("close", () => {
26-
this[Symbol.dispose]();
27-
});
24+
// No auto-cleanup - callers explicitly dispose via timeout/abort handlers
25+
// Process streams close naturally when process exits
2826
}
2927

3028
/**

0 commit comments

Comments
 (0)