Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): ctrl+C no longer kills processes (#11434) #11518

Merged
merged 3 commits into from Jan 2, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/vite/src/node/shortcuts.ts
Expand Up @@ -44,8 +44,11 @@ export function bindShortcuts(
const onInput = async (input: string) => {
// ctrl+c or ctrl+d
if (input === '\x03' || input === '\x04') {
process.emit('SIGTERM')
return
try {
await server.close()
} finally {
process.exit(1)
}
kinfuy marked this conversation as resolved.
Show resolved Hide resolved
}

if (actionRunning) return
Expand Down