diff options
| author | Junio C Hamano <gitster@pobox.com> | 2010-03-07 14:54:01 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2010-03-07 14:54:01 -0800 |
| commit | 8499da04766e46f50872b615a9972da53209253a (patch) | |
| tree | 4c10ac0bebff1d6d4c30a2889b166a15ab985953 /run-command.h | |
| parent | 47b333f7593d7b1883062d7e6ad4069f0ff19b23 (diff) | |
| parent | 466dbc42f58623d4341d6b1171b5cc13e2b700df (diff) | |
| download | git-8499da04766e46f50872b615a9972da53209253a.tar.gz | |
Merge branch 'sp/maint-push-sideband' into maint-1.6.6
* sp/maint-push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe
Diffstat (limited to 'run-command.h')
| -rw-r--r-- | run-command.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/run-command.h b/run-command.h index fb342090e3..65ccb1c60f 100644 --- a/run-command.h +++ b/run-command.h @@ -18,7 +18,7 @@ struct child_process { * - Specify > 0 to set a channel to a particular FD as follows: * .in: a readable FD, becomes child's stdin * .out: a writable FD, becomes child's stdout/stderr - * .err > 0 not supported + * .err: a writable FD, becomes child's stderr * The specified FD is closed by start_command(), even in case * of errors! */ @@ -64,17 +64,20 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const */ struct async { /* - * proc writes to fd and closes it; + * proc reads from in; closes it before return + * proc writes to out; closes it before return * returns 0 on success, non-zero on failure */ - int (*proc)(int fd, void *data); + int (*proc)(int in, int out, void *data); void *data; + int in; /* caller writes here and closes it */ int out; /* caller reads from here and closes it */ #ifndef WIN32 pid_t pid; #else HANDLE tid; - int fd_for_proc; + int proc_in; + int proc_out; #endif }; |
