Skip to content

Commit e37f0aa

Browse files
committed
src: add fflush() to SnapshotData::ToFile()
Refs: nodejs#46491 (comment)
1 parent d592630 commit e37f0aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node_snapshotable.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ void SnapshotData::ToFile(FILE* out) const {
866866
const std::vector<char> sink = ToBlob();
867867
size_t num_written = fwrite(sink.data(), sink.size(), 1, out);
868868
CHECK_EQ(num_written, 1);
869+
CHECK_EQ(fflush(out), 0);
869870
}
870871

871872
const SnapshotData* SnapshotData::FromEmbedderWrapper(

0 commit comments

Comments
 (0)