From d29b741e72359dda6de1acc0af990439a1514a40 Mon Sep 17 00:00:00 2001 From: Alexander Nedotsukov Date: Wed, 10 Jun 2009 03:21:27 +0000 Subject: Improve output buffer flushing so the aux info (timestamp etc) do not stuck till the next cycle. --- sysutils/mbmon/Makefile | 2 +- sysutils/mbmon/files/patch-mbmon.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'sysutils/mbmon') diff --git a/sysutils/mbmon/Makefile b/sysutils/mbmon/Makefile index 6f5735a018fd..73edeea1b70a 100644 --- a/sysutils/mbmon/Makefile +++ b/sysutils/mbmon/Makefile @@ -7,7 +7,7 @@ PORTNAME?= mbmon PORTVERSION= 205 -PORTREVISION?= 4 +PORTREVISION?= 5 CATEGORIES= sysutils MASTER_SITES= http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/ DISTNAME= xmbmon${PORTVERSION} diff --git a/sysutils/mbmon/files/patch-mbmon.c b/sysutils/mbmon/files/patch-mbmon.c index dbb1be28f0ed..30d759104011 100644 --- a/sysutils/mbmon/files/patch-mbmon.c +++ b/sysutils/mbmon/files/patch-mbmon.c @@ -1,5 +1,5 @@ ---- mbmon.c.orig Fri Aug 13 09:23:32 2004 -+++ mbmon.c Wed May 3 21:32:44 2006 +--- mbmon.c.orig 2004-08-13 16:23:32.000000000 +0900 ++++ mbmon.c 2009-06-10 12:13:47.000000000 +0900 @@ -315,7 +315,7 @@ name = argv[0]; @@ -9,11 +9,19 @@ #else while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhP:")) != -1) { #endif -@@ -640,6 +640,7 @@ - else if (fanspeed == 7) +@@ -641,6 +641,7 @@ fprintf(out, "%4d\n%4d\n%4d\n", rot1, rot2, rot3); } -+ fflush(out); if (port) { ++ fflush(out); #ifdef LOGGING if (nfd) + #endif +@@ -659,6 +660,7 @@ + if (hostname_flag == 1) { + hostname(sh_flag); + } ++ fflush(stdout); + + /* count */ + if (count != 0) { -- cgit v1.2.3