This commit is contained in:
2026-08-14 16:03:47 +01:00
parent fd53e3f4fb
commit dfdc3b2840
2463 changed files with 186456 additions and 111315 deletions
+2 -5
View File
@@ -14,11 +14,8 @@ class StdinDiscarder {
const code = typeof chunk === 'string' ? chunk.codePointAt(0) : chunk[0];
if (code === ASCII_ETX_CODE) {
if (process.listenerCount('SIGINT') > 0) {
process.emit('SIGINT');
} else {
process.kill(process.pid, 'SIGINT');
}
// Always re-signal the process. Emitting `SIGINT` directly breaks normal Ctrl+C termination when libraries install listeners for cleanup.
process.kill(process.pid, 'SIGINT');
}
};