diff options
author | Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> | 2011-07-24 23:31:59 +0100 |
---|---|---|
committer | unknown <Steven Murdoch@.(none)> | 2011-07-25 04:08:08 +0100 |
commit | 5bf9890b3b18ad98f5ac601992bc08533ce9e209 (patch) | |
tree | 8d297ef6fa27c96b7d669fc661b4b1a6ffdea0a2 /src/test/test-child.c | |
parent | 99baa7e45cc65f0683912c59934679df554fa306 (diff) | |
download | tor-5bf9890b3b18ad98f5ac601992bc08533ce9e209.tar.gz tor-5bf9890b3b18ad98f5ac601992bc08533ce9e209.zip |
Test case for reading the partial output of a background process
Diffstat (limited to 'src/test/test-child.c')
-rw-r--r-- | src/test/test-child.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-child.c b/src/test/test-child.c index cf49c5d31e..1b9c5e3d57 100644 --- a/src/test/test-child.c +++ b/src/test/test-child.c @@ -19,6 +19,10 @@ main(int argc, char **argv) for (i = 1; i < argc; i++) fprintf(stdout, "%s\n", argv[i]); fprintf(stdout, "SLEEPING\n"); + /* We need to flush stdout so that test_util_spawn_background_partial_read() + succeed. Otherwise ReadFile() will get the entire output in one */ + // XXX: Can we make stdio flush on newline? + fflush(stdout); #ifdef MS_WINDOWS Sleep(1000); #else |