From owner-freebsd-current@FreeBSD.ORG Sat Feb 19 20:54:43 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E387D106564A for ; Sat, 19 Feb 2011 20:54:43 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id BB5B18FC08 for ; Sat, 19 Feb 2011 20:54:43 +0000 (UTC) Received: from draco.over-yonder.net (c-75-64-226-141.hsd1.ms.comcast.net [75.64.226.141]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id AB80E37B4B0; Sat, 19 Feb 2011 14:37:30 -0600 (CST) Received: by draco.over-yonder.net (Postfix, from userid 100) id 734DD61C5C; Sat, 19 Feb 2011 14:37:29 -0600 (CST) Date: Sat, 19 Feb 2011 14:37:29 -0600 From: "Matthew D. Fuller" To: Jeremie Le Hen Message-ID: <20110219203729.GE27891@over-yonder.net> References: <20110219185043.GA6573@felucia.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110219185043.GA6573@felucia.tataz.chchile.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.21-fullermd.4 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: freebsd-current@FreeBSD.org Subject: Re: [RFC] Force stdio output streams to line-buffered mode X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 20:54:44 -0000 On Sat, Feb 19, 2011 at 07:50:43PM +0100 I heard the voice of Jeremie Le Hen, and lo! it spake thus: > > I've attached a small patch for stdio, so if the environment variable > STDIO_IOLBF is set, the output streams will be line-oriented by default. > iostat -x 1 | env STDIO_IOLBF=1 grep -v ad10 | cat -n I've no real comment on anything else (sounds like an interesting hack, whatever else), but just for this particular case, you know that grep has a --line-buffered arg, right? -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.