diff options
author | René Scharfe <l.s.r@web.de> | 2015-10-24 14:11:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-11-02 15:01:00 -0800 |
commit | 2d71608ec0b6d098ed7c8c914fb7004b28349995 (patch) | |
tree | 7f388e56b6831f6afb47ef5b09fa776b40ad3f00 /Documentation/technical | |
parent | a2558fb8e1e387b630312311e1d22c95663da5d0 (diff) | |
download | git-2d71608ec0b6d098ed7c8c914fb7004b28349995.tar.gz |
run-command: factor out child_process_clear()
Avoid duplication by moving the code to release allocated memory for
arguments and environment to its own function, child_process_clear().
Export it to provide a counterpart to child_process_init().
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r-- | Documentation/technical/api-run-command.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt index a9fdb45b93..8bf3e37f53 100644 --- a/Documentation/technical/api-run-command.txt +++ b/Documentation/technical/api-run-command.txt @@ -46,6 +46,13 @@ Functions The argument dir corresponds the member .dir. The argument env corresponds to the member .env. +`child_process_clear`:: + + Release the memory associated with the struct child_process. + Most users of the run-command API don't need to call this + function explicitly because `start_command` invokes it on + failure and `finish_command` calls it automatically already. + The functions above do the following: . If a system call failed, errno is set and -1 is returned. A diagnostic |