]> git.ozlabs.org Git - ccan/commitdiff
ccanlint: fix mangled output for 'make scores'
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 17 Mar 2011 11:42:22 +0000 (22:12 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 17 Mar 2011 11:42:22 +0000 (22:12 +1030)
We need to flush stdout before forking.

tools/tools.c

index dd7243c2c6a7ff6d213a291642e700a661e90627..77f77f0fe6741b09904f64d31ddd147871f7e40b 100644 (file)
@@ -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) {