projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c6bbde3
)
ccanlint: fix mangled output for 'make scores'
author
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 17 Mar 2011 11:42:22 +0000
(22:12 +1030)
committer
Rusty 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
patch
|
blob
|
history
diff --git
a/tools/tools.c
b/tools/tools.c
index dd7243c2c6a7ff6d213a291642e700a661e90627..77f77f0fe6741b09904f64d31ddd147871f7e40b 100644
(file)
--- 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);
if (tools_verbose)
printf("Running: %s\n", cmd);
+ /* Always flush buffers before fork! */
+ fflush(stdout);
gettimeofday(&start, NULL);
pid = fork();
if (pid == -1) {
gettimeofday(&start, NULL);
pid = fork();
if (pid == -1) {