aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.h
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.h
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.h')
-rw-r--r--src/test/test.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test.h b/src/test/test.h
index 092356f0fb..7c17389776 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -241,6 +241,7 @@ extern struct testcase_t pem_tests[];
extern struct testcase_t periodic_event_tests[];
extern struct testcase_t policy_tests[];
extern struct testcase_t procmon_tests[];
+extern struct testcase_t process_tests[];
extern struct testcase_t proto_http_tests[];
extern struct testcase_t proto_misc_tests[];
extern struct testcase_t protover_tests[];