git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFH] Flush progress message buffer in display().

From
Nicolas Pitre <nico@cam.org>
Date
Nov 19, 2007, 20:54 UTC
Message-ID
<alpine.LFD.0.99999.0711191549510.19105@xanadu.home>
In-Reply-To
<7voddqm0l7.fsf@gitster.siamese.dyndns.org>
On Mon, 19 Nov 2007, Junio C Hamano wrote:
Show 16 quoted lines
> Johannes Sixt <johannes.sixt@telecom.at> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “[RFH] Flush progress message buffer in display().”
  1. Johannes SixtNov 19, 2007
  2. Junio C HamanoNov 19, 2007
  3. Nicolas PitreNov 19, 2007
  4. Junio C HamanoNov 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.