Boyd Lynn Gerber <gerberb@xxxxxxxxx> writes: > On Wed, 3 Sep 2008, Junio C Hamano wrote: > ... >> Ah, ok. I should have noticed that setlinebuf() was outside POSIX (it is >> not usable on older BSDs either). >> >> Let's see if we can replace it with setvbuf() which is POSIX. > > This fixes the problem. on both OS's. By the way, have you actually exercised the codepath, or does your above "fixes" mean "compiles"? I knew it would compile on a system with POSIX setvbuf(), but I was unsure about the size argument. I know for glibc giving <NULL, 0> would be equivalent to setlinebuf(), but POSIX itself leaves what exactly happens to the size argument quite vague, saying only "otherwise [when buf is a null pointer], size may determine the size of a buffer allocated by the setvbuf() function." Does size=0 mean it allocates very little, and while it tries to line buffer the output, because the buffer is so small that it fails to buffer an entire line causing early flushing of the stream? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html