]> Savannah Git Hosting - gnulib.git/commitdiff
execute, spawn-pipe: Improve documentation.
authorBruno Haible <bruno@clisp.org>
Mon, 30 Nov 2020 02:01:22 +0000 (03:01 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 30 Nov 2020 13:41:04 +0000 (14:41 +0100)
* lib/execute.h: Describe progname, prog_path, prog_argv.
* lib/spawn-pipe.h: Likewise.

ChangeLog
lib/execute.h
lib/spawn-pipe.h

index 91b2d2d89414da921e8422a904444c48fbb221eb..ccb436fe7768d151f33766ee4794df13c548f94c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-11-30  Bruno Haible  <bruno@clisp.org>
+
+       execute, spawn-pipe: Improve documentation.
+       * lib/execute.h: Describe progname, prog_path, prog_argv.
+       * lib/spawn-pipe.h: Likewise.
+
 2020-11-30  Bruno Haible  <bruno@clisp.org>
 
        execute tests: Add more tests.
index 7e0ea0f1fe8205226855e9589e8548bb6a631390..b31c4d1fe47792ba659d4604ffc1d0e6ad5788d0 100644 (file)
    descriptors to /dev/null.  Return its exit code.
    If it didn't terminate correctly, exit if exit_on_error is true, otherwise
    return 127.
+   progname is the name of the program to be executed by the subprocess, used
+   for error messages.
+   prog_path is the file name of the program to be executed by the subprocess.
+   If it contains no slashes, a search is conducted in $PATH.  An operating
+   system dependent suffix is added, if necessary.
+   prog_argv is the array of strings that the subprocess shall receive in
+   argv[].  It is a NULL-terminated array.  prog_argv[0] should normally be
+   identical to prog_path.
    If ignore_sigpipe is true, consider a subprocess termination due to SIGPIPE
    as equivalent to a success.  This is suitable for processes whose only
    purpose is to write to standard output.
index 6a95650ee0fa0644aae95c0a7f0ab34fed572f35..be0f1c8c717c92cd5faaa91ba44a03a554298784 100644 (file)
@@ -42,6 +42,15 @@ extern "C" {
    After finishing communication, the caller should call wait_subprocess()
    to get rid of the subprocess in the process table.
 
+   progname is the name of the program to be executed by the subprocess, used
+   for error messages.
+   prog_path is the file name of the program to be executed by the subprocess.
+   If it contains no slashes, a search is conducted in $PATH.  An operating
+   system dependent suffix is added, if necessary.
+   prog_argv is the array of strings that the subprocess shall receive in
+   argv[].  It is a NULL-terminated array.  prog_argv[0] should normally be
+   identical to prog_path.
+
    If slave_process is true, the child process will be terminated when its
    creator receives a catchable fatal signal or exits normally.  If
    slave_process is false, the child process will continue running in this