fix(watcher): always tree-kill on stop regardless of childProcess.killed flag
The direct bash child may already be dead from terminal SIGINT while grandchildren (tsrun, devserver) are still running. Removing the .killed guard ensures tree-kill always runs to clean up the entire process tree.
This commit is contained in:
@@ -202,7 +202,9 @@ export class Watcher {
|
||||
clearTimeout(this.debounceTimer);
|
||||
}
|
||||
await this.smartwatchInstance.stop();
|
||||
if (this.currentExecution && !this.currentExecution.childProcess.killed) {
|
||||
if (this.currentExecution) {
|
||||
// Always tree-kill — even if the direct child is dead (.killed === true),
|
||||
// grandchildren (e.g. tsrun, devserver) may still be running.
|
||||
await this.currentExecution.kill();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user