mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Split run_command into two halves (start/finish)
If the calling process wants to send data to stdin of a child process it will need to arrange for a pipe and get the child process running, feed data to it, then wait for the child process to finish. So we split the run function into two halves, allowing callers to first start the child then later finish it. 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
f1000898d4
commit
ebcb5d16ca
@@ -12,11 +12,14 @@ enum {
|
||||
|
||||
struct child_process {
|
||||
const char **argv;
|
||||
pid_t pid;
|
||||
unsigned no_stdin:1;
|
||||
unsigned git_cmd:1; /* if this is to be git sub-command */
|
||||
unsigned stdout_to_stderr:1;
|
||||
};
|
||||
|
||||
int start_command(struct child_process *);
|
||||
int finish_command(struct child_process *);
|
||||
int run_command(struct child_process *);
|
||||
|
||||
#define RUN_COMMAND_NO_STDIN 1
|
||||
|
||||
Reference in New Issue
Block a user