Skip to content

Commit

Permalink
Disable output buffering in tests_exhaustive.c
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Sep 10, 2020
1 parent ee8b816 commit dd29d2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tests_exhaustive.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ int main(int argc, char** argv) {
unsigned char rand32[32];
secp256k1_context *ctx;

/* Disable buffering for stdout to improve reliability of getting
* diagnostic information. Happens right at the start of main because
* setbuf must be used before any other operation on the stream. */
setbuf(stdout, NULL);
/* Also disable buffering for stderr because it's not guaranteed that it's
* unbuffered on all systems. */
setbuf(stderr, NULL);

/* find iteration count */
if (argc > 1) {
count = strtol(argv[1], NULL, 0);
Expand Down

0 comments on commit dd29d2e

Please sign in to comment.