-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: add note for handling signal events in trace events #41438
doc: add note for handling signal events in trace events #41438
Conversation
@nodejs/diagnostics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Can someone from diagnostics explain why the signal handler is needed in this case :)? |
Reading the linked issues and #22734 tells that flushing the trace events in a signal handler is not trivial and would require quite some work (if possible at all). There is #22883 since a while which asks for a fix. By installing a signal handler from JS the default action of this signal (end process) is not executed anymore. By calling |
e358dfb
to
2483455
Compare
2483455
to
99f3758
Compare
Landed in 806c7c1 |
Refs: nodejs#14802 PR-URL: nodejs#41438 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Keeping in mind issues like #18476 and #14802, I went ahead and added a note to the docs for users to handle signal events properly, so that trace events are correctly logged into files.
I'm happy to make any changes to this PR as needed since it's my first time contributing to the Node.js project.