path: root/run-command.h
diff options
authorJohannes Sixt <>2008-02-16 17:36:38 (GMT)
committerJunio C Hamano <>2008-02-23 19:59:44 (GMT)
commite72ae28895b22052b7ca2eef36c039ac62671f7d (patch)
tree35e5df11a285b4467054fcec75cf8e35f38093e1 /run-command.h
parent923d44aeb7cb6d21eeb459fdc1b58137e37c2b1c (diff)
start_command(), .in/.out/.err = -1: Callers must close the file descriptor
By setting .in, .out, or .err members of struct child_process to -1, the callers of start_command() can request that a pipe is allocated that talks to the child process and one end is returned by replacing -1 with the file descriptor. Previously, a flag was set (for .in and .out, but not .err) to signal finish_command() to close the pipe end that start_command() had handed out, so it was optional for callers to close the pipe, and many already do so. Now we make it mandatory to close the pipe. Signed-off-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'run-command.h')
1 files changed, 0 insertions, 2 deletions
diff --git a/run-command.h b/run-command.h
index 1fc781d..e9c84d0 100644
--- a/run-command.h
+++ b/run-command.h
@@ -19,8 +19,6 @@ struct child_process {
int err;
const char *dir;
const char *const *env;
- unsigned close_in:1;
- unsigned close_out:1;
unsigned no_stdin:1;
unsigned no_stdout:1;
unsigned no_stderr:1;