Skip to content

Commit

Permalink
src: add fflush() to SnapshotData::ToFile()
Browse files Browse the repository at this point in the history
Refs: #46491 (comment)
PR-URL: #46531
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
addaleax authored Feb 8, 2023
1 parent 85c8b78 commit 5092346
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ void SnapshotData::ToFile(FILE* out) const {
const std::vector<char> sink = ToBlob();
size_t num_written = fwrite(sink.data(), sink.size(), 1, out);
CHECK_EQ(num_written, 1);
CHECK_EQ(fflush(out), 0);
}

const SnapshotData* SnapshotData::FromEmbedderWrapper(
Expand Down

0 comments on commit 5092346

Please sign in to comment.