NetBSD Problem Report #32836
From www@netbsd.org Tue Feb 14 14:39:34 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 0054863B879; Tue, 14 Feb 2006 14:39:34 +0000 (UTC)
Message-Id: <20060214143934.0054863B879@narn.netbsd.org>
Date: Tue, 14 Feb 2006 14:39:34 +0000 (UTC)
From: takuro@bonz.squares.net
Reply-To: takuro@bonz.squares.net
To: gnats-bugs@netbsd.org
Subject: vmstat(1),stdout buffered on using pipe.
X-Send-Pr-Version: www-1.0
>Number: 32836
>Category: bin
>Synopsis: vmstat(1),stdout buffered on using pipe.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 14 14:40:01 +0000 2006
>Closed-Date: Fri Nov 28 06:00:37 +0000 2008
>Last-Modified: Fri Nov 28 06:00:37 +0000 2008
>Originator: Takuro KUBOTA
>Release: 3.0
>Organization:
>Environment:
NetBSD blue.home.ichijiku.org 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 01:04:02 UTC 2005 builds@works.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/i386/200512182024Z-obj/home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386
>Description:
vmstat(1),stdout buffered on using pipe.
if it run "vmstat -f -w 1 | awk '/total/ { print systime() ":" $1;}'", then sometimes output.
>How-To-Repeat:
vmstat -f -w 1 | awk '/total/ { print systime() ":" $1;}'
>Fix:
--- vmstat.c.org 2006-02-14 01:27:35.000000000 +0900
+++ vmstat.c 2006-02-14 01:28:20.000000000 +0900
@@ -463,6 +463,7 @@
putchar('\n');
}
+ (void)fflush(stdout);
if (reps >= 0 && --reps <=0)
break;
nanosleep(&interval, NULL);
>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/32836 CVS commit: src/usr.bin/vmstat
Date: Fri, 28 Nov 2008 05:58:22 +0000 (UTC)
Module Name: src
Committed By: dholland
Date: Fri Nov 28 05:58:22 UTC 2008
Modified Files:
src/usr.bin/vmstat: vmstat.c
Log Message:
Add missing fflush() in one of three places that print stuff repeatedly
every so often. PR 32836 from Takuro KUBOTA.
To generate a diff of this commit:
cvs rdiff -r1.163 -r1.164 src/usr.bin/vmstat/vmstat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 28 Nov 2008 06:00:37 +0000
State-Changed-Why:
fixed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.