Skip to content

Conversation

@AndreasMadsen
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

trace_events

@AndreasMadsenAndreasMadsen added dont-land-on-v4.x trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events. labels Jan 5, 2018
@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jan 5, 2018
@AndreasMadsen
Copy link
MemberAuthor

@AndreasMadsen
Copy link
MemberAuthor


proc.once('exit', common.mustCall(() =>{
assert(common.fileExists(FILE_NAME));
fs.readFile(FILE_NAME, common.mustCall((err, data) =>{
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a child process 'exit' event, not process.exit(). fs.readFileSync() is probably a simpler idea either way though.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is how all of the other trace-events tests work. I can change it, but at least it should be consistent.

@AndreasMadsen
Copy link
MemberAuthor

Landed in 6aac05b

MylesBorins pushed a commit that referenced this pull request Jan 10, 2018
PR-URL: #18005 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 10, 2018
MylesBorins pushed a commit that referenced this pull request Jan 10, 2018
PR-URL: #18005 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2018
Backport-PR-URL: #18179 PR-URL: #18005 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.trace_eventsIssues and PRs related to V8, Node.js core, and userspace code trace events.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@AndreasMadsen@bnoordhuis@jasnell@cjihrig@gireeshpunathil@BethGriggs@nodejs-github-bot