Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(cli): ctrl+C no longer kills processes (#11434) (#11518)
Co-authored-by: Arnaud Barré <arnaud.barre72@gmail.com>
close #11434
  • Loading branch information
kinfuy committed Jan 2, 2023
1 parent 3647d07 commit 718fc1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/shortcuts.ts
Expand Up @@ -44,7 +44,8 @@ export function bindShortcuts(
const onInput = async (input: string) => {
// ctrl+c or ctrl+d
if (input === '\x03' || input === '\x04') {
process.emit('SIGTERM')
process.stdin.setRawMode(false)
process.stdin.write(input)
return
}

Expand Down

0 comments on commit 718fc1d

Please sign in to comment.