Code

Merge branch 'jc/post-simplify' (early part) into tr/filter-branch
[git.git] / Documentation / technical / api-run-command.txt
index fde3b453211030b7256ccedd100970ef712338bd..75aa5d49234ec36857a7c8d2f3900001af5cbcde 100644 (file)
@@ -30,7 +30,7 @@ Functions
        start_command() followed by finish_command(). Takes a pointer
        to a `struct child_process` that specifies the details.
 
-`run_command_v_opt`, `run_command_v_opt_dir`, `run_command_v_opt_cd_env`::
+`run_command_v_opt`, `run_command_v_opt_cd`, `run_command_v_opt_cd_env`::
 
        Convenience functions that encapsulate a sequence of
        start_command() followed by finish_command(). The argument argv
@@ -63,7 +63,7 @@ command to run in a sub-process.
 
 The caller:
 
-1. allocates and clears (memset(&chld, '0', sizeof(chld));) a
+1. allocates and clears (memset(&chld, 0, sizeof(chld));) a
    struct child_process variable;
 2. initializes the members;
 3. calls start_command();
@@ -111,9 +111,10 @@ stderr as follows:
        .no_stdin, .no_stdout, .no_stderr: The respective channel is
                redirected to /dev/null.
 
-       .stdout_to_stderr: stdout of the child is redirected to the
-               parent's stderr (i.e. *not* to what .err or
-               .no_stderr specify).
+       .stdout_to_stderr: stdout of the child is redirected to its
+               stderr. This happens after stderr is itself redirected.
+               So stdout will follow stderr to wherever it is
+               redirected.
 
 To modify the environment of the sub-process, specify an array of
 string pointers (NULL terminated) in .env:
@@ -135,7 +136,7 @@ to produce output that the caller reads.
 
 The caller:
 
-1. allocates and clears (memset(&asy, '0', sizeof(asy));) a
+1. allocates and clears (memset(&asy, 0, sizeof(asy));) a
    struct async variable;
 2. initializes .proc and .data;
 3. calls start_async();