Skip to content

Commit 718fc1d

Browse files
authored
fix(cli): ctrl+C no longer kills processes (#11434) (#11518)
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com> close #11434
1 parent 3647d07 commit 718fc1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/node/shortcuts.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export function bindShortcuts(
4444
const onInput = async (input: string) => {
4545
// ctrl+c or ctrl+d
4646
if (input === '\x03' || input === '\x04') {
47-
process.emit('SIGTERM')
47+
process.stdin.setRawMode(false)
48+
process.stdin.write(input)
4849
return
4950
}
5051

0 commit comments

Comments
 (0)