lkml.org 
[lkml]   [2008]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] hackbench: flush buffers before fork
Here's a fixlet for the hackbench program found at

http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c

When redirecting hackbench output I am seeing multiple copies of the
"Running with %d*40 (== %d) tasks" line. Need to flush the buffered
output before forking.


diff --git a/hackbench.c b/hackbench.c
index 7b90840..e830461 100644
--- a/hackbench.c
+++ b/hackbench.c
@@ -321,6 +321,8 @@ int main(int argc, char *argv[])
printf("Running with %d*40 (== %d) tasks.\n",
num_groups, num_groups*40);

+ fflush(NULL);
+
if (argc > 2) {
if ( !strcmp(argv[2], "process") )
process_mode = 1;
--
1.5.4.rc5.5.gab98


\
 
 \ /
  Last update: 2008-06-23 19:47    [W:0.031 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site