This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc calls more write() than necessary


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]