trace_events: stop tracing agent in process.exit()#18005
Closed
AndreasMadsen wants to merge 2 commits intonodejs:masterfrom
AndreasMadsen:trace-event-process-exit
Closed
trace_events: stop tracing agent in process.exit()#18005AndreasMadsen wants to merge 2 commits intonodejs:masterfrom AndreasMadsen:trace-event-process-exit
AndreasMadsen wants to merge 2 commits intonodejs:masterfrom
AndreasMadsen:trace-event-process-exit
Conversation
Member
Author
cjihrig
approved these changes
Jan 5, 2018
jasnell
approved these changes
Jan 5, 2018
Member
Author
gireeshpunathil
approved these changes
Jan 7, 2018
bnoordhuis
reviewed
Jan 7, 2018
|
|
||
| proc.once('exit', common.mustCall(() => { | ||
| assert(common.fileExists(FILE_NAME)); | ||
| fs.readFile(FILE_NAME, common.mustCall((err, data) => { |
Member
There was a problem hiding this comment.
Use fs.readFileSync here, the async version is not guaranteed to complete. In fact, it probably doesn't but that goes unnoticed because the common.mustCall(...) isn't checked as you're already inside an exit handler.
Contributor
There was a problem hiding this comment.
This is a child process 'exit' event, not process.exit(). fs.readFileSync() is probably a simpler idea either way though.
Member
Author
There was a problem hiding this comment.
This is how all of the other trace-events tests work. I can change it, but at least it should be consistent.
Member
Author
|
Landed in 6aac05b |
MylesBorins
pushed a commit
that referenced
this pull request
Jan 10, 2018
PR-URL: #18005 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Jan 10, 2018
PR-URL: #18005 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This was referenced Jan 16, 2018
gibfahn
pushed a commit
to gibfahn/node
that referenced
this pull request
Jan 17, 2018
PR-URL: nodejs#18005 Backport-PR-URL: nodejs#18179 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
trace_events