Add output flushing before fork()
This adds fflush(NULL) before fork() in start_command(), to keep the generic interface safe. A remaining use of fork() with no flushing is in a comment in show_tree(). Rewrite that comment to use start_command(). 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
611921654f
commit
7d0b18a4da
@ -68,6 +68,7 @@ int start_command(struct child_process *cmd)
|
||||
trace_argv_printf(cmd->argv, "trace: run_command:");
|
||||
|
||||
#ifndef __MINGW32__
|
||||
fflush(NULL);
|
||||
cmd->pid = fork();
|
||||
if (!cmd->pid) {
|
||||
if (cmd->no_stdin)
|
||||
|
||||
Reference in New Issue
Block a user