Andreas Schwab wrote: >Pádraig Brady <[EMAIL PROTECTED]> writes: > > > >>p. p.s. Note glibc changes the buffering automatically for stdout only like: >> if (isatty(fileno(stdout)) setlinebuf(stdout) >>Also it always leaves stdin buffered and stdout unbuffered. >> >> > ^^^^^^ >stderr > > yep, thanks.
> > >>p.p.s. setvbuf(stdin, (char*) NULL, _IOFBF, 12345) is not honoured, >>which is fair enough as buf==NULL. >>However 0 is returned indicating it was honoured? >> >> > >What do you mean with "not honoured"? The size may be ignored when buf is >NULL. > > >From the man page: "The function setvbuf returns 0 on success. It can return any value on failure, but returns nonzero when mode is invalid or the request cannot be honoured. It may set errno on failure. The other functions are void." It's just that above call seems to have no affect, i.e. it's probably a programmer error to call with (buf==NULL && size!=0)? Therefore I would not expect it to return 0 (success). thanks, Pádraig. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils