]> git.ipfire.org Git - thirdparty/git.git/blobdiff - run-command.c
run-command: introduce child_process_init()
[thirdparty/git.git] / run-command.c
index a29a34fb1d0f5737a0db0aa7f02252cac324b378..47ab21bcc3811b23d1b1e5e59941b17aa2757558 100644 (file)
@@ -8,6 +8,12 @@
 # define SHELL_PATH "/bin/sh"
 #endif
 
+void child_process_init(struct child_process *child)
+{
+       memset(child, 0, sizeof(*child));
+       argv_array_init(&child->args);
+}
+
 struct child_to_clean {
        pid_t pid;
        struct child_to_clean *next;