Skip to content

Commit

Permalink
Merge pull request #36 from iNavFlight/dont_buffer_stdout_to_avoid_fr…
Browse files Browse the repository at this point in the history
…eebsd_pipe_overruns

don't buffer stdout, avoiding FreeBSD pipe overruns
  • Loading branch information
stronnag authored May 25, 2021
2 parents fd8f16f + 6560f97 commit c2a8e6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blackbox_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,8 @@ int decodeFlightLog(flightLog_t *log, const char *filename, int logIndex)
}

// Request buffering which increases throughput on Windows removable drives
setvbuf(csvFile, NULL, _IOFBF, BUFSIZ);
if (!options.toStdout)
setvbuf(csvFile, NULL, _IOFBF, BUFSIZ);

fprintf(stderr, "Decoding log '%s' to '%s'...\n", filename, csvFilename);
free(csvFilename);
Expand Down

0 comments on commit c2a8e6a

Please sign in to comment.