aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2018-11-22 04:25:11 +0100
committerNick Mathewson <nickm@torproject.org>2018-12-17 16:39:28 -0500
commit35509978dd4985901431abe895d1443e75afc00a (patch)
tree70d1b4ff8919b5da64607736adfaae9af08c92d5 /src/test/test.c
parent2b41b857bdabffeafbbf748189b22cd6ee818394 (diff)
downloadtor-35509978dd4985901431abe895d1443e75afc00a.tar.gz
tor-35509978dd4985901431abe895d1443e75afc00a.zip
Add new Process subsystem.
This patch adds a new Process subsystem for running external programs in the background of Tor. The design is focused around a new type named `process_t` which have an API that allows the developer to easily write code that interacts with the given child process. These interactions includes: - Easy API for writing output to the child process's standard input handle. - Receive callbacks whenever the child has output on either its standard output or standard error handles. - Receive callback when the child process terminates. We also support two different "protocols" for handling output from the child process. The default protocol is the "line" protocol where the process output callbacks will be invoked only when there is complete lines (either "\r\n" or "\n" terminated). We also support the "raw" protocol where the read callbacks will get whatever the operating system delivered to us in a single read operation. This patch does not include any operating system backends, but the Unix and Windows backends will be included in separate commits. See: https://bugs.torproject.org/28179
Diffstat (limited to 'src/test/test.c')
-rw-r--r--src/test/test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 17b736d305..b13c3ffbe2 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -898,6 +898,7 @@ struct testgroup_t testgroups[] = {
{ "periodic-event/" , periodic_event_tests },
{ "policy/" , policy_tests },
{ "procmon/", procmon_tests },
+ { "process/", process_tests },
{ "proto/http/", proto_http_tests },
{ "proto/misc/", proto_misc_tests },
{ "protover/", protover_tests },