From de954149f81f7f4f8df3e612382e8ba0541596cd Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 9 Dec 2010 01:26:18 +0100 Subject: Force flush of writes to stdout in c/tests/test_child. --- NEWS | 1 + c/tests/test_child.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index f1fd9ce..31374d5 100644 --- a/NEWS +++ b/NEWS @@ -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 +#include #include #include #include @@ -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); -- cgit v1.2.1