From 298dc1222201440ccfbf39f59a68b37aa910ff0c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 17 Mar 2011 22:12:22 +1030 Subject: [PATCH] ccanlint: fix mangled output for 'make scores' We need to flush stdout before forking. --- tools/tools.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.39.2