From: Nicolas Pitre Date: Mon, 19 Nov 2007 20:54:05 GMT Subject: Re: [RFH] Flush progress message buffer in display(). Message-ID: In-Reply-To: <7voddqm0l7.fsf@gitster.siamese.dyndns.org> On Mon, 19 Nov 2007, Junio C Hamano wrote: > Johannes Sixt writes: > > > I need this patch on Windows because appearently progress output is buffered > > by stdio. Why doesn't Linux/glibc's stdio buffer output that goes to a pipe? > > ... > > ... What is flushing the progress > > output? > > The standard error stream is not "fully buffered": > > http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_05.html#tag_02_05 > > Not "fully buffered" means either "unbuffered" or "line > buffered". Because the progress display does not terminate its > line, it means that the additional fflush(stderr) you added are > needed if the stream is line buffered (still conforming). Maybe stdio on Linux considers \r as a line termination. Flushing stderr should not hurt anyway. Nicolas