davidmarkclements / 0x

🔥 single-command flamegraph profiling 🔥
MIT License
3.21k stars 103 forks source link

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

Closed rubenpad closed 2 years ago

rubenpad commented 2 years ago

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