-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Don't listen to SIGPROF #21
Comments
@paulirish 👍 I'll get a release out for you this weekend. |
@sindresorhus @jamestalmage @isaacs, I don't think there's any good reason to continue catching |
From the
SIGPROF appears to be a fatal signal (at least Node.js thinks so, @paulirish - What about just adding a noop SIGPROF listener when using debug mode: process.on("SIGPROF", function () {}); That will prevent any listeners registered using |
I totally agree, BTW. Just playing devils advocate / wondering if there is a better way. |
@jamestalmage another thought, what if we made it so you could configure the |
shucks, I guess we'd need to bubble the config all the way through |
Is Node launched with a special flag for debugging? Can we detect that from |
There basically is a way to do that already, via a noop listener. |
Sorry to interject here, but #20 is somewhat related and it'd be awesome if we could remove listening to |
#19 / #20 is different. That said, I don't see a big problem with removing I do think adding an option should be avoided. That would leave it up to users of the library to avoid interfering with the debugger. |
It's not node that considers it fatal, it's the OS. Since Node doesn't add a listener to the The point of this library is to ensure that your exit callback will definitely get called on any would-be-fatal signal if at all possible. (For example, in the case of @paulirish When you say it's "causing problems" can you provide more details, or a link to where these problems are described? It shouldn't conflict to have multiple listeners to an event, and just removing SIGPROF from the list would violate the signal-exit contract. |
@iarna is running into an issue with In the short term, I would like to stop hooking into In the medium term, I would like to detect whether Node has been invoked in the context of a profiler and enable/disable hooking into Does this seem reasonable @isaacs? |
BREAKING CHANGE: signal-exit no longer wires into SIGPROF
@paulirish would it be possible for you to try this candidate release:
This has |
@paulirish https://github.com/tapjs/signal-exit/blob/master/CHANGELOG.md |
We're working on a new debugging protocol for Node that exposes all functionality Chrome DevTools uses. Context:
Anyhow, the
SIGPROF
listener in this project is causing problems when we're debugging an app using sindresorhus/meow and thus sindresorhus/loud-rejectionAs a result, the debugging client is conflicting with the listener done here.
Can you remove this listener?
+cc meow folks: @sindresorhus @jamestalmage
+cc node debugger folks: @repenaxa
The text was updated successfully, but these errors were encountered: