[master] f7a3acb Start documenting vtc's process

Federico G. Schwindt fgsch at lodoss.net
Sat Jan 7 18:41:05 CET 2017


commit f7a3acb83bfba001c5b95fd5d40eef1819496db6
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Sat Jan 7 16:39:13 2017 +0000

    Start documenting vtc's process

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 86ecf6a..e53cd82 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -313,8 +313,47 @@ process_close(struct process *p)
 	p->fds[1] = -1;
 }
 
-/**********************************************************************
- * Process command dispatch
+/* SECTION: process process
+ *
+ * Run a process in the background with stdout and stderr redirected to
+ * ${tmpdir}/pNAME/stdout and ${tmpdir}/pNAME/stderr, respectively::
+ *
+ *	process pNAME SPEC [-wait] [-start] [-run] [-kill STRING] [-stop] \
+ *		[-write STRING] [-writeln STRING] [-close]
+ *
+ * pNAME
+ *	Name of the process. It must start with 'p'.
+ *
+ * SPEC
+ *	The command(s) to run in this process.
+ *
+ * \-start
+ *	Start the process.
+ *
+ * \-wait
+ *	Wait for the process to finish.
+ *
+ * \-run
+ *	Shorthand for -start -wait.
+ *
+ * \-kill STRING
+ *	Send a signal to the process. The argument can be either
+ *	the string "TERM", "INT", or "KILL" for SIGTERM, SIGINT or SIGKILL
+ *	signals, respectively, or a hyphen (-) followed by the signal
+ *	number.
+ *
+ * \-stop
+ *	Shorthand for -kill TERM.
+ *
+ * \-write STRING
+ *	Write a string to the process' stdin.
+ *
+ * \-writeln STRING
+ *	Same as -write followed by a newline (\\n).
+ *
+ * \-close
+ *	Close the process' stdin.
+ *
  */
 
 void
diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am
index d00c566..5923186 100644
--- a/doc/sphinx/Makefile.am
+++ b/doc/sphinx/Makefile.am
@@ -183,6 +183,7 @@ VTCSYN_SRC = $(top_srcdir)/bin/varnishtest/vtc.c \
 	     $(top_srcdir)/bin/varnishtest/vtc_http.c \
 	     $(top_srcdir)/bin/varnishtest/vtc_http2.c \
 	     $(top_srcdir)/bin/varnishtest/vtc_logexp.c \
+	     $(top_srcdir)/bin/varnishtest/vtc_process.c \
 	     $(top_srcdir)/bin/varnishtest/vtc_varnish.c
 include/vtc-syntax.rst: vtc-syntax.py $(VTCSYN_SRC)
 	$(PYTHON) $(top_srcdir)/doc/sphinx/vtc-syntax.py $(VTCSYN_SRC) > $@



More information about the varnish-commit mailing list