fix: handle Windows taskkill errors in orphaned process cleanup

Wrap taskkill call in try/catch so one process failing to kill doesn't
abort cleanup of remaining processes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2025-12-26 20:54:39 -05:00
parent 2a60794485
commit def01790ea
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -448,7 +448,11 @@ export class WorkerService {
logger.warn('SYSTEM', 'Skipping invalid PID', { pid });
continue;
}
execSync(`taskkill /PID ${pid} /T /F`, { timeout: 60000, stdio: 'ignore' });
try {
execSync(`taskkill /PID ${pid} /T /F`, { timeout: 60000, stdio: 'ignore' });
} catch {
// Process may have already exited - continue cleanup
}
}
} else {
for (const pid of pids) {