From 35509978dd4985901431abe895d1443e75afc00a Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Thu, 22 Nov 2018 04:25:11 +0100 Subject: 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 --- src/lib/process/.may_include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/process/.may_include') diff --git a/src/lib/process/.may_include b/src/lib/process/.may_include index a2d57a52f3..b1c50c24a6 100644 --- a/src/lib/process/.may_include +++ b/src/lib/process/.may_include @@ -4,8 +4,9 @@ lib/cc/*.h lib/container/*.h lib/ctime/*.h lib/err/*.h -lib/intmath/*.h +lib/evloop/*.h lib/fs/*.h +lib/intmath/*.h lib/log/*.h lib/malloc/*.h lib/net/*.h @@ -15,4 +16,4 @@ lib/subsys/*.h lib/testsupport/*.h lib/thread/*.h -ht.h \ No newline at end of file +ht.h -- cgit v1.2.3-54-g00ecf