Queue and UI fixes

This commit is contained in:
2026-03-05 11:04:20 +00:00
parent 23acea4773
commit e3d890c071
103 changed files with 11400 additions and 2010 deletions

View File

@@ -71,18 +71,23 @@ function spawnTrackedProcess({
});
});
let cancelCalled = false;
const cancel = () => {
if (child.killed) {
if (cancelCalled) {
return;
}
cancelCalled = true;
logger.warn('spawn:cancel:requested', { cmd, args, context, pid: child.pid });
child.kill('SIGINT');
setTimeout(() => {
if (!child.killed) {
try {
process.kill(child.pid, 0);
logger.warn('spawn:cancel:force-kill', { cmd, args, context, pid: child.pid });
child.kill('SIGKILL');
} catch (_e) {
// Process already terminated
}
}, 3000);
};