mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Setup stderr before stdout on Windows as well.
This implements what ce2cf27adc does on Unix.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
@@ -132,6 +132,14 @@ int start_command(struct child_process *cmd)
|
||||
dup2(cmd->in, 0);
|
||||
}
|
||||
|
||||
if (cmd->no_stderr) {
|
||||
s2 = dup(2);
|
||||
dup_devnull(2);
|
||||
} else if (need_err) {
|
||||
s2 = dup(2);
|
||||
dup2(fderr[1], 2);
|
||||
}
|
||||
|
||||
if (cmd->no_stdout) {
|
||||
s1 = dup(1);
|
||||
dup_devnull(1);
|
||||
@@ -146,14 +154,6 @@ int start_command(struct child_process *cmd)
|
||||
dup2(cmd->out, 1);
|
||||
}
|
||||
|
||||
if (cmd->no_stderr) {
|
||||
s2 = dup(2);
|
||||
dup_devnull(2);
|
||||
} else if (need_err) {
|
||||
s2 = dup(2);
|
||||
dup2(fderr[1], 2);
|
||||
}
|
||||
|
||||
if (cmd->dir)
|
||||
die("chdir in start_command() not implemented");
|
||||
if (cmd->env) {
|
||||
|
||||
Reference in New Issue
Block a user