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

Re: [PATCH maint] start_command: flush buffers in the WIN32 code path as well

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Feb 4, 2011, 11:23 UTC
Message-ID
<87sjw4jb5q.fsf@fox.patthoyts.tk>
In-Reply-To
<4D4BBBD6.7010100@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 40 quoted lines
>From: Johannes Sixt <j6t@kdbg.org>
>
>The POSIX code path did The Right Thing already, but we have to do the same
>on Windows.
>
>This bug caused failures in t5526-fetch-submodules, where the output of
>'git fetch --recurse-submodules' was in the wrong order.
>
>Debugged-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
>Signed-off-by: Johannes Sixt <j6t@kdbg.org>
>---
>Am 2/3/2011 21:26, schrieb Johannes Schindelin:
>> Have you seen my response where I proved that it is a fflush() issue, most 
>> likely with mingw_spawn()?
>
>I think this is the correct fix.
>
> run-command.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/run-command.c b/run-command.c
>index 2a1041e..f91e446 100644
>--- a/run-command.c
>+++ b/run-command.c
>@@ -194,6 +194,7 @@ fail_pipe:
> 	}
> 
> 	trace_argv_printf(cmd->argv, "trace: run_command:");
>+	fflush(NULL);
> 
> #ifndef WIN32
> {
>@@ -201,7 +202,6 @@ fail_pipe:
> 	if (pipe(notify_pipe))
> 		notify_pipe[0] = notify_pipe[1] = -1;
> 
>-	fflush(NULL);
> 	cmd->pid = fork();
> 	if (!cmd->pid) {
> 		/*
This fixes the issue for me on msysGit. Thanks.
-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Johannes SixtNext: Johannes Schindelin
Message 10 of 11 in “some test fixes for msysGit”
  1. some test fixes for msysGitPat Thoyts, Feb 3, 2011
  2. 1/4 t3509: use unconstrained initial test to setup repository.Pat Thoyts, Feb 3, 2011
  3. 2/4 t4120-apply-popt: help systems with core.filemode=falsePat Thoyts, Feb 3, 2011
  4. 3/4 t7407: fix line endings for mingw buildPat Thoyts, Feb 3, 2011
  5. 4/4 t5526: avoid dependency on submodule orderPat Thoyts, Feb 3, 2011
  6. Johannes SixtFeb 3, 2011
  7. Johannes SchindelinFeb 3, 2011
  8. Johannes SixtFeb 3, 2011
  9. start_command: flush buffers in the WIN32 code path as wellJohannes Sixt, Feb 4, 2011
  10. Pat ThoytsFeb 4, 2011
  11. Johannes SchindelinFeb 3, 2011

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.