Skip to content

Commit a0771d1

Browse files
committed
Explicitly disable buffering for stderr in tests
1 parent fb424fb commit a0771d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tests.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5174,6 +5174,9 @@ int main(int argc, char **argv) {
51745174
* diagnostic information. Happens right at the start of main because
51755175
* setbuf must be used before any other operation on the stream. */
51765176
setbuf(stdout, NULL);
5177+
/* Also disable buffering for stderr because it's not guaranteed that it's
5178+
* unbuffered on all systems. */
5179+
setbuf(stderr, NULL);
51775180

51785181
/* find iteration count */
51795182
if (argc > 1) {

0 commit comments

Comments
 (0)