glibc calls more write() than necessary
Mike Frysinger
vapier@gentoo.org
Sun Jan 21 20:48:00 GMT 2007
On Sunday 21 January 2007 15:08, Matthieu Lemerre wrote:
> int
> main (int argc, char **argv)
> {
> printf ("hello\nworld\ne");
> printf ("hello\n\%s\n","char");
> }
>
> yields (with strace)
>
> write(1, "hello\n", 6hello
> ) = 6
> write(1, "world\n", 6world
> ) = 6
> write(1, "ehello\n", 7ehello
> ) = 7
> write(1, "char\n", 5char
this is correct and standards conforming ... please read the setbuf(3) manpage
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070121/5298cda8/attachment.sig>
More information about the Libc-alpha
mailing list