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

Gracefully shutdown when receiving signal SIGTERM and SIGINT #1525

Closed
hyrious opened this issue Jan 14, 2021 · 0 comments
Closed

Gracefully shutdown when receiving signal SIGTERM and SIGINT #1525

hyrious opened this issue Jan 14, 2021 · 0 comments

Comments

@hyrious
Copy link
Contributor

hyrious commented Jan 14, 2021

Is your feature request related to a problem? Please describe.

I'm making an electron app using concurrently to start two processes -- electron . and vite. When the app closes, concurrently sends SIGTERM to the vite process and it terminates with exit code 1.

You can checkout vite-electron-quick to have a look.

Describe the solution you'd like

process.on('SIGTERM', async () => {
  	await shutdownServer();
});

Describe alternatives you've considered

Use vite's createServer() api and do listen signals by self.

Additional context

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant