Browse Source

ccanlint: fix mangled output for 'make scores'

We need to flush stdout before forking.
Rusty Russell 15 years ago
parent
commit
298dc12222
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tools/tools.c

+ 2 - 0
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) {