From 3748acb3c4a691fad0ec2d23ace04b608ae971f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barr=C3=A9?= Date: Tue, 3 Jan 2023 08:35:36 +0100 Subject: [PATCH] fix(cli): revert ctrl+C no longer kills processes (#11434) (#11518) (#11562) --- packages/vite/src/node/shortcuts.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite/src/node/shortcuts.ts b/packages/vite/src/node/shortcuts.ts index 6c35953c5af8ac..a34c96f3f6a3c5 100644 --- a/packages/vite/src/node/shortcuts.ts +++ b/packages/vite/src/node/shortcuts.ts @@ -44,8 +44,7 @@ export function bindShortcuts( const onInput = async (input: string) => { // ctrl+c or ctrl+d if (input === '\x03' || input === '\x04') { - process.stdin.setRawMode(false) - process.stdin.write(input) + process.emit('SIGTERM') return }