Flush output in start_async
This prevents double output in case stdout is redirected. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
22537765f5
commit
2c3766f06a
@ -304,6 +304,9 @@ int start_async(struct async *async)
|
||||
async->out = pipe_out[0];
|
||||
|
||||
#ifndef __MINGW32__
|
||||
/* Flush stdio before fork() to avoid cloning buffers */
|
||||
fflush(NULL);
|
||||
|
||||
async->pid = fork();
|
||||
if (async->pid < 0) {
|
||||
error("fork (async) failed: %s", strerror(errno));
|
||||
|
Reference in New Issue
Block a user