From: Rusty Russell Date: Thu, 17 Mar 2011 11:42:22 +0000 (+1030) Subject: ccanlint: fix mangled output for 'make scores' X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=298dc1222201440ccfbf39f59a68b37aa910ff0c ccanlint: fix mangled output for 'make scores' We need to flush stdout before forking. --- diff --git a/tools/tools.c b/tools/tools.c index dd7243c2..77f77f0f 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -81,6 +81,8 @@ char *run_with_timeout(const void *ctx, const char *cmd, if (tools_verbose) printf("Running: %s\n", cmd); + /* Always flush buffers before fork! */ + fflush(stdout); gettimeofday(&start, NULL); pid = fork(); if (pid == -1) {