aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util_slow.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-03-08 01:47:12 +0100
committerAlexander Færøy <ahf@torproject.org>2017-03-09 00:10:17 +0100
commit6e78ede73f190f3aaf91623a131a20cf031aad7e (patch)
treec7e0da2be9971fb50aa34a7566112cdb0f7afd27 /src/test/test_util_slow.c
parent86de065aee642585e092969c69681f7e8847a648 (diff)
downloadtor-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_util_slow.c')
-rw-r--r--src/test/test_util_slow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_util_slow.c b/src/test/test_util_slow.c
index 1e7160598c..96a2fa756b 100644
--- a/src/test/test_util_slow.c
+++ b/src/test/test_util_slow.c
@@ -242,7 +242,7 @@ test_util_spawn_background_partial_read_impl(int exit_early)
#else
/* Check that we didn't read the end of file last time */
tt_assert(!eof);
- pos = tor_read_all_handle(process_handle->stdout_handle, stdout_buf,
+ pos = tor_read_all_handle(process_handle->stdout_pipe, stdout_buf,
sizeof(stdout_buf) - 1, NULL, &eof);
#endif
log_info(LD_GENERAL, "tor_read_all_handle() returned %d", (int)pos);
@@ -273,7 +273,7 @@ test_util_spawn_background_partial_read_impl(int exit_early)
#else
if (!eof) {
/* We should have got all the data, but maybe not the EOF flag */
- pos = tor_read_all_handle(process_handle->stdout_handle, stdout_buf,
+ pos = tor_read_all_handle(process_handle->stdout_pipe, stdout_buf,
sizeof(stdout_buf) - 1,
process_handle, &eof);
tt_int_op(0,OP_EQ, pos);