Teach run-command about stdout redirection

Some potential callers of the run_command family of functions need
to control not only the stdin redirection of the child, but also
the stdout redirection of the child.  This can now be setup much
like the already existing stdin redirection.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Shawn O. Pearce
2007-03-12 14:37:45 -04:00
committed by Junio C Hamano
parent 27ebd6e044
commit f4bba25bdc
2 changed files with 31 additions and 1 deletions

View File

@ -15,7 +15,9 @@ struct child_process {
const char **argv;
pid_t pid;
int in;
int out;
unsigned close_in:1;
unsigned close_out:1;
unsigned no_stdin:1;
unsigned git_cmd:1; /* if this is to be git sub-command */
unsigned stdout_to_stderr:1;