Teach run-command to redirect stdout to /dev/null
Some run-command callers may wish to just discard any data that is sent to stdout from the child. This is a lot like our existing no_stdin support, we just open /dev/null and duplicate the descriptor into position. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
f4bba25bdc
commit
e4507ae84e
@ -19,6 +19,7 @@ struct child_process {
|
||||
unsigned close_in:1;
|
||||
unsigned close_out:1;
|
||||
unsigned no_stdin:1;
|
||||
unsigned no_stdout:1;
|
||||
unsigned git_cmd:1; /* if this is to be git sub-command */
|
||||
unsigned stdout_to_stderr:1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user