Native `tsc` ignores SIGINT and SIGTERM while compiling — Ctrl-C does not interrupt a build, and the process exits 0#64196
🔎 Search Terms
SIGINT, SIGTERM, ctrl-c, ctrl+c, signal, interrupt, tsgo does not exit,
native tsc kill, exit code 0 killed, cancel build
🕗 Version & Regression Information
- This changed between versions 6.x (the JavaScript compiler) and 7.0 (the native compiler).
Running the TS 6
tsc.jsunder Node and sendingSIGTERMmid-compile terminates it immediately; the nativetscin 7.0.2 ignores it and runs to completion. - Also reproduces on
[email protected](nightly), so it is not already fixed. - Tested on macOS 15 (Darwin 25.5.0), arm64,
@typescript/typescript-darwin-arm64.
⏯ Playground Link
No response
💻 Code
Not reproducible in the Playground — this is CLI/process behaviour. Any project large enough to leave a signalling window will do. This generator produces one using nothing but plain interfaces and functions (no errors, no deep generics, no external libraries):
// gen.js
const fs = require('fs');
fs.mkdirSync('src', { recursive: true });
for (let f = 0; f < 30000; f++) {
let s = '';
for (let i = 0; i < 20; i++) {
s += `export interface I${f}_${i} { id: string; n: number; ok: boolean; tags: string[]; at: Date; }\n`;
s += `export function f${f}_${i}(x: I${f}_${i}): I${f}_${i} { return { ...x, n: x.n + 1 }; }\n`;
s += `export const c${f}_${i} = f${f}_${i}({ id: "a", n: ${i}, ok: true, tags: ["t"], at: new Date() });\n`;
}
if (f > 0) s += `import { f${f - 1}_0 } from './m${f - 1}';\n`;
fs.writeFileSync(`src/m${f}.ts`, s);
}
fs.writeFileSync('tsconfig.json', JSON.stringify({
compilerOptions: { strict: true, target: 'ES2020', module: 'commonjs', noEmit: true, skipLibCheck: true },
include: ['src'],
}, null, 2));