Avoid double output in fenv_test

This tests fork()s, so if there is still data in the stdout buffer on fork
it will print it again in the child process. This was happening in the
CheriBSD CI and caused the test to complain about malformed TAP output.

Reviewed By:	ngie
Differential Revision: https://reviews.freebsd.org/D28397

(cherry picked from commit 892a05ee3a)
This commit is contained in:
Alex Richardson 2021-01-29 09:29:26 +00:00
parent 70a2e9a3d4
commit 76713be0f5

View file

@ -539,6 +539,8 @@ test_feholdupdate(void)
int
main(void)
{
/* Avoid double output after fork() */
setvbuf(stdout, NULL, _IONBF, 0);
printf("1..8\n");
init_exceptsets();