Skip to content

Commit

Permalink
bug fix for multi thread appends
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Aug 10, 2023
1 parent 787c7e5 commit 8fb3cfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dlio_profiler/writer/chrome_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ dlio_profiler::ChromeWriter::log(std::string &event_name, std::string &category,

void dlio_profiler::ChromeWriter::finalize() {
if (fp != nullptr) {
int status = fseek(fp, 0, SEEK_SET);
int status = fclose(fp);
fp = fopen(filename.c_str(), "w");
status = fseek(fp, 0, SEEK_SET);
if (status != 0) {
ERROR(status != -1, "unable to seek to start log file %d", filename.c_str());
}
Expand Down

0 comments on commit 8fb3cfe

Please sign in to comment.