Hi Bruno,
Bruno Haible <[email protected]> writes:
> Thanks Collin, for having reported the issue to the musl list.
No problem.
> The test failure is still present in today's CI, on Alpine Linux.
Yes, I haven't made any changes because of it. The only realistic
solution I see is adding the following snippet to the start of each
program:
#if MUSL_LIBC
if (isatty (STDOUT_FILENO))
setvbuf (stdout, NULL, _IOFBF, BUFSIZ);
#endif
Given the number of programs, I obviously do not love that solution.
After defining what "fully buffered", etc. mean POSIX says [1]:
Support for these characteristics is implementation-defined, and may
be affected via setbuf() and setvbuf().
So I guess Musl is compliant, technically. But I find the behavior a bit
silly.
Collin
[1]
https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_05