diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-03-08 01:47:12 +0100 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-03-09 00:10:17 +0100 |
commit | 6e78ede73f190f3aaf91623a131a20cf031aad7e (patch) | |
tree | c7e0da2be9971fb50aa34a7566112cdb0f7afd27 /src/test/test_pt.c | |
parent | 86de065aee642585e092969c69681f7e8847a648 (diff) | |
download | tor-6e78ede73f190f3aaf91623a131a20cf031aad7e.tar.gz tor-6e78ede73f190f3aaf91623a131a20cf031aad7e.zip |
Remove buffered I/O stream usage in process_handle_t.
This patch removes the buffered I/O stream usage in process_handle_t and
its related utility functions. This simplifies the code and avoids racy
code where we used buffered I/O on non-blocking file descriptors.
See: https://bugs.torproject.org/21654
Diffstat (limited to 'src/test/test_pt.c')
-rw-r--r-- | src/test/test_pt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_pt.c b/src/test/test_pt.c index f93019f1c4..f50c75ab48 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -284,13 +284,13 @@ test_pt_get_extrainfo_string(void *arg) } #ifdef _WIN32 -#define STDIN_HANDLE HANDLE +#define STDIN_HANDLE HANDLE* #else -#define STDIN_HANDLE FILE +#define STDIN_HANDLE int #endif static smartlist_t * -tor_get_lines_from_handle_replacement(STDIN_HANDLE *handle, +tor_get_lines_from_handle_replacement(STDIN_HANDLE handle, enum stream_status *stream_status_out) { static int times_called = 0; |