diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-03-10 03:28:05 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-11 22:49:37 -0700 |
commit | ebcb5d16ca911d5e21bb8071c185fb47a0c1fbb3 (patch) | |
tree | cb912d237836c26730119693c2b252b4b9ae18fb /run-command.h | |
parent | f1000898d43a30f6a0d3bbde7b4927e97913d010 (diff) | |
download | git-ebcb5d16ca911d5e21bb8071c185fb47a0c1fbb3.tar.gz |
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>
Diffstat (limited to 'run-command.h')
-rw-r--r-- | run-command.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/run-command.h b/run-command.h index f9db2a7f8c..24cdb4eb19 100644 --- a/run-command.h +++ b/run-command.h @@ -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 |