All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Pat Thoyts <patthoyts@users.sourceforge.net>,
	msysgit@googlegroups.com, Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH maint] start_command: flush buffers in the WIN32 code path as well
Date: Fri, 04 Feb 2011 09:41:58 +0100	[thread overview]
Message-ID: <4D4BBBD6.7010100@viscovery.net> (raw)
In-Reply-To: <alpine.DEB.1.00.1102031426110.1541@bonsai2>

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) {
 		/*
-- 
1.7.4.1253.g00c7

  parent reply	other threads:[~2011-02-04  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 15:31 [PATCH] some test fixes for msysGit Pat Thoyts
2011-02-03 15:31 ` [PATCH 1/4] t3509: use unconstrained initial test to setup repository Pat Thoyts
2011-02-03 15:31 ` [PATCH 2/4] t4120-apply-popt: help systems with core.filemode=false Pat Thoyts
2011-02-03 15:31 ` [PATCH 3/4] t7407: fix line endings for mingw build Pat Thoyts
2011-02-03 15:31 ` [PATCH 4/4] t5526: avoid dependency on submodule order Pat Thoyts
2011-02-03 20:08   ` [msysGit] " Johannes Sixt
2011-02-03 20:26     ` Johannes Schindelin
2011-02-03 20:56       ` Johannes Sixt
2011-02-04  8:41       ` Johannes Sixt [this message]
2011-02-04 11:23         ` [PATCH maint] start_command: flush buffers in the WIN32 code path as well Pat Thoyts
2011-02-03 16:29 ` [msysGit] [PATCH] some test fixes for msysGit Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4BBBD6.7010100@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.com \
    --cc=patthoyts@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.