- Mar 25, 2019
-
-
Nick Mathewson authored
This module implements a way to send messages from one module to another, with associated data types. It does not yet do anything to ensure that messages are correct, that types match, or that other forms of consistency are preserved.
-
Nick Mathewson authored
We already do this in our log_debug() macro, but there are times when we'd like to avoid allocating or precomputing something that we are only going to log if debugging is on.
-
Nick Mathewson authored
Tests included.
-
Nick Mathewson authored
You use this when you're defining a macro to be used at file scope, and you want to require a semicolon afterwards.
-
Nick Mathewson authored
-
Nick Mathewson authored
We'll be using this for four kinds of identifier in dispatch.c
-
- Jan 11, 2019
-
-
When cleaning up after an error in process_unix_exec, the stdin pipe was being double closed instead of closing both the stdin and stdout pipes. This occurred in two places. Signed-off-by:
Kris Katterjohn <katterjohn@gmail.com>
-
Nick Mathewson authored
-
Taylor R Campbell authored
NOTE: This commit breaks the build, because there was a mistake in an earlier change of exactly the sort that this is meant to detect! I'm leaving it broken for illustration.
-
Taylor R Campbell authored
-
Taylor R Campbell authored
Test exactly what the geometric sampler returns, because that's what the downstream callers of it are going to use. While here, also assert that the geometric sampler returns a positive integer. (Our geometric distribution is the one suported on {1, 2, 3, ...} that returns the number of trials before the first success, not the one supported on {0, 1, 2, ...} that returns the number of failures before the first success.)
-
- Jan 10, 2019
-
- Jan 09, 2019
-
-
Prior to this commit, the testsuite was failing on OpenBSD. After this commit the testsuite runs fine on OpenBSD. It was previously decided to test for the OpenBSD macro (rather than __OpenBSD__, etc.) because OpenBSD forks seem to have the former macro defined. sys/param.h must be included for the OpenBSD macro definition; however, many files tested for the OpenBSD macro without having this header included. This commit includes sys/param.h in the files where the OpenBSD macro is used (and sys/param.h is not already included), and it also changes some instances of the __OpenBSD__ macro to OpenBSD. See commit 27df23ab which changed everything to use OpenBSD instead of __OpenBSD__ or OPENBSD. See also tickets #6982 and #20980 (the latter ticket is where it was decided to use the OpenBSD macro). Signed-off-by:
Kris Katterjohn <katterjohn@gmail.com>
-
- Jan 08, 2019
-
-
teor authored
Add some details about IP family support, and point to tor_socketpair() from tor_ersatz_socketpair(). Closes ticket 29015.
-
- Jan 07, 2019
-
-
Kris Katterjohn authored
In get_local_listener used by tor_ersatz_socketpair, the address family used when binding the IPv6 socket was AF_INET instead of AF_INET6. Fixes bug 28995; bugfix on 0.3.5.1-alpha. Signed-off-by:
Kris Katterjohn <katterjohn@gmail.com>
-
- Jan 03, 2019
-
-
Nick Mathewson authored
Reported on tor-dev by Gisle Vanem. Bug not in any released Tor (The suggested patch used _MSC_VER, but that's not how we do stuff with autoconf. With autoconf, you detect the feature you want, rather than trying to list all the systems that do or do not have it.)
-
Nick Mathewson authored
Closes ticket 28851.
-
- Jan 02, 2019
-
-
Nick Mathewson authored
-
George Kadianakis authored
Co-authored-by:
Mike Perry <mikeperry-git@torproject.org>
-
George Kadianakis authored
This project introduces the prob_distr.c subsystem which implements all the probability distributions that WTF-PAD needs. It also adds unittests for all of them. Code and tests courtesy of Riastradh. Co-authored-by:
Taylor R Campbell <campbell+tor@mumble.net> Co-authored-by:
Mike Perry <mikeperry-git@torproject.org>
-
George Kadianakis authored
Co-authored-by:
George Kadianakis <desnacked@riseup.net>
-
Mike Perry authored
We need this for padding negotiation so that we can have later machine revisions supercede earlier ones. Co-authored-by:
George Kadianakis <desnacked@riseup.net>
-
- Dec 21, 2018
-
-
Nick Mathewson authored
-
-
This patch makes the process module use the subsystem list for initializing and shutting down. See: https://bugs.torproject.org/28847
-
Taylor Yu authored
Part of ticket 27167.
-
- Dec 20, 2018
-
-
Alexander Hansen Færøy authored
This allows other libraries to include process.h without including the smartlist_t headers first. See: https://bugs.torproject.org/28847
-
Alexander Hansen Færøy authored
Let's not use log_warn() when a pipe is closed under what should be considered normal conditions. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
This patch changes the CancelIoEx() example code to use CancelIo(), which is available for older versions of Windows too. I still think the kernel handles this nicely by sending broken pipes if either side closes the pipe while I/O operations are pending. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
Handle `ERROR_BROKEN_PIPE` from ReadFileEx() and WriteFileEx() in process_win32_stdin_write_done() and process_win32_handle_read_completion() instead of in the early handler. This most importantmly makes sure that `reached_eof` is set to true when these errors appears. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
This patch adds some missing calls to set `reached_eof` of our handles when various error conditions happens or when we close our handle (which happens at `process_terminate()`. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
This patch adds some additional error checking after calls to ReadFileEx() and WriteFileEx(). I have not managed to get this code to reach the branch where `error_code` is NOT `ERROR_SUCCESS`, but MSDN says one should check for this condition so we do so just to be safe. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
This patch makes us delay checking for whether we have an exit code value (via GetExitCodeProcess()) until both stdout and stderr have been closed by the operating system either by the process itself or by process cleanup after termination. See: https://bugs.torproject.org/28179
-
Alexander Hansen Færøy authored
This prevents us from leaking the HANDLE for stdout, stderr, and stdin. See: https://bugs.torproject.org/28179
-
- Dec 18, 2018
-
-
This patch makes sure that we terminate the event loop from the event loop timer instead of directly in the process' exit handler. This allows us to run the event loop an additional time to ensure that the SleepEx() call on Windows is called and the data from stdout/stderr is delivered to us. Additionally we ensure that we don't try to read or write data from a Unix process that have been terminated in the main loop, since its file descriptors are closed at that time. See: https://bugs.torproject.org/28179
-
- Dec 17, 2018
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
This patch changes the API of the Windows backend of the Process subsystem to allow the dormant interface to disable the Process event timer. See: https://bugs.torproject.org/28179
-