diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-12-09 01:26:18 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-12-09 01:26:18 +0100 |
commit | de954149f81f7f4f8df3e612382e8ba0541596cd (patch) | |
tree | bdaf97d775eb816e7acfeab1d27c96e43c20222f | |
parent | d7ae295931962ad4150aeef4d55b5bffebdca87c (diff) | |
download | subunit-git-de954149f81f7f4f8df3e612382e8ba0541596cd.tar.gz |
Force flush of writes to stdout in c/tests/test_child.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | c/tests/test_child.c | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -17,6 +17,7 @@ IMPROVEMENTS per ``testtools.run``. This required a dependency bump due to a small API change in ``testtools``. (Robert Collins) +* Force flush of writes to stdout in c/tests/test_child. (Jelmer Vernooij, #687611) 0.0.6 ----- diff --git a/c/tests/test_child.c b/c/tests/test_child.c index 0744599..1318322 100644 --- a/c/tests/test_child.c +++ b/c/tests/test_child.c @@ -16,6 +16,7 @@ **/ #include <stdlib.h> +#include <stdio.h> #include <unistd.h> #include <string.h> #include <check.h> @@ -57,6 +58,8 @@ test_stdout_function(char const * expected, * DEAL. */ function(); + /* flush writes on FILE object to file descriptor */ + fflush(stdout); /* restore stdout now */ if (dup2(old_stdout, 1) != 1) { close(old_stdout); |