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:
Johannes Sixt
2008-03-13 13:17:42 +01:00
parent 13cae476a6
commit d0e8078ae5

View File

@@ -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) {