summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-run-command.txt
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-08-19 21:10:48 +0200
committerJunio C Hamano <gitster@pobox.com>2014-08-20 09:54:58 -0700
commit483bbd4e4ce8a5c717cd47d732893317a14c965a (patch)
tree65987463920d8dfe402f8abdc7febbb62332d30b /Documentation/technical/api-run-command.txt
parentd3180279322c7450a47decf8833de47f444ca93f (diff)
downloadgit-483bbd4e4ce8a5c717cd47d732893317a14c965a.tar.gz
run-command: introduce child_process_init()
Add a helper function for initializing those struct child_process variables for which the macro CHILD_PROCESS_INIT can't be used. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-run-command.txt')
-rw-r--r--Documentation/technical/api-run-command.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt
index ca066bfe37..842b8389eb 100644
--- a/Documentation/technical/api-run-command.txt
+++ b/Documentation/technical/api-run-command.txt
@@ -13,6 +13,10 @@ produces in the caller in order to process it.
Functions
---------
+`child_process_init`
+
+ Initialize a struct child_process variable.
+
`start_command`::
Start a sub-process. Takes a pointer to a `struct child_process`
@@ -96,8 +100,8 @@ command to run in a sub-process.
The caller:
-1. allocates and clears (memset(&chld, 0, sizeof(chld)); or
- using CHILD_PROCESS_INIT) a struct child_process variable;
+1. allocates and clears (using child_process_init() or
+ CHILD_PROCESS_INIT) a struct child_process variable;
2. initializes the members;
3. calls start_command();
4. processes the data;