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: call soft close instead of process.exit when CTRL + C is pressed #254

Merged
merged 1 commit into from
Feb 21, 2022
Merged

fix: call soft close instead of process.exit when CTRL + C is pressed #254

merged 1 commit into from
Feb 21, 2022

Conversation

rubenpad
Copy link
Contributor

0x is not generating the flame graph when CTRL + C is pressed.

It is due to the process end up having two listeners for the SIGINT signal [process.exit, softClose].

This could also fix the issue on https://github.com/clinicjs/node-clinic-flame/issues/161

Copy link
Contributor

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

I don't understand why it solves the issue, looks like you are doing the same thing. Can you elaborate?

Never mind, I see it now. Good catch.

Copy link
Contributor

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 3cfb63a into davidmarkclements:master Feb 21, 2022
@rubenpad rubenpad deleted the fix/soft-exit-signals branch February 21, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants