From f3b33f1d220056243d3c1da154d3859410630189 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Fri, 19 Oct 2007 21:47:58 +0200 Subject: 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 Signed-off-by: Shawn O. Pearce --- run-command.h | 1 + 1 file changed, 1 insertion(+) (limited to 'run-command.h') diff --git a/run-command.h b/run-command.h index 7958eb1e0b..35b9fb61f1 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; -- cgit v1.2.1