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(gatsby): properly unlock processes onExit #26670

Merged
merged 5 commits into from
Aug 31, 2020

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Aug 27, 2020

Description

It seems like onBeforeExit isn't called when the process gets killed by SIGINT and SIGTEM.

The 'beforeExit' event is not emitted for conditions causing explicit termination, such as calling process.exit() or uncaught exceptions.
https://nodejs.org/api/process.html#process_event_beforeexit

using singal-exit I'm sure everything gets called. I also switched to execa.node to use the same node version as it's started with.

Related issues

Fixes #26501

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 27, 2020
@pieh pieh self-assigned this Aug 28, 2020
@pieh pieh added status: needs core review Currently awaiting review from Core team member type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 28, 2020
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I think this is good to go in now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs core review Currently awaiting review from Core team member type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sometimes when I stop Gatsby server, it isn't actually being stopped
2 participants