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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

>From: Johannes Sixt <j6t@xxxxxxxx>
>
>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@xxxxxx>
>Signed-off-by: Johannes Sixt <j6t@xxxxxxxx>
>---
>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

--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]