aboutsummaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-24 14:57:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-24 14:57:54 -0700
commit217610d7d61864f24efc0ea837dc911be44fd9c6 (patch)
treeebcbe1cde6d22498c7007a0b3e117e93168378f8 /run-command.h
parentf35a02b15d22521c4902d8b3434c7c55eeab4a1d (diff)
parenta915459097b72da9cc058172a54029352b684b0f (diff)
downloadgit-217610d7d61864f24efc0ea837dc911be44fd9c6.tar.xz
Merge branch 'rs/run-command-env-array'
Add managed "env" array to child_process to clarify the lifetime rules. * rs/run-command-env-array: use env_array member of struct child_process run-command: add env_array, an optional argv_array for env
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/run-command.h b/run-command.h
index 1b135d1c96..2137315ee4 100644
--- a/run-command.h
+++ b/run-command.h
@@ -10,6 +10,7 @@
struct child_process {
const char **argv;
struct argv_array args;
+ struct argv_array env_array;
pid_t pid;
/*
* Using .in, .out, .err:
@@ -44,7 +45,7 @@ struct child_process {
unsigned clean_on_exit:1;
};
-#define CHILD_PROCESS_INIT { NULL, ARGV_ARRAY_INIT }
+#define CHILD_PROCESS_INIT { NULL, ARGV_ARRAY_INIT, ARGV_ARRAY_INIT }
void child_process_init(struct child_process *);
int start_command(struct child_process *);