summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-10-19 19:47:58 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-21 05:30:40 (GMT)
commitf3b33f1d220056243d3c1da154d3859410630189 (patch)
tree28970fae26a6dd7bfccd1472a7bed7ea9c07b436 /run-command.h
parent477822c35dbf3d5f16fce1425638e761e60ede3d (diff)
downloadgit-f3b33f1d220056243d3c1da154d3859410630189.zip
git-f3b33f1d220056243d3c1da154d3859410630189.tar.gz
git-f3b33f1d220056243d3c1da154d3859410630189.tar.bz2
Have start_command() create a pipe to read the stderr of the child.
This adds another stanza that allocates a pipe that is connected to the child's stderr and that the caller can read from. In order to request this pipe, the caller sets cmd->err to -1. The implementation is not exactly modeled after the stdout case: For stdout the caller can supply an existing file descriptor, but this facility is nowhere needed in the stderr case. Additionally, the caller is required to close cmd->err. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/run-command.h b/run-command.h
index 7958eb1..35b9fb6 100644
--- a/run-command.h
+++ b/run-command.h
@@ -16,6 +16,7 @@ struct child_process {
pid_t pid;
int in;
int out;
+ int err;
const char *dir;
const char *const *env;
unsigned close_in:1;