From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/427 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Anti-bloat side project Date: Tue, 16 Aug 2011 09:06:43 -0400 Message-ID: <20110816130643.GQ132@brightrain.aerifal.cx> References: <20110627170806.GA24833@brightrain.aerifal.cx> <20110627211625.GC5036@port70.net> <20110627211909.GZ12592@brightrain.aerifal.cx> <20110627213805.GD5036@port70.net> <20110627213739.GA12592@brightrain.aerifal.cx> <20110627214300.GB12592@brightrain.aerifal.cx> <20110629141945.GL5036@port70.net> <20110629192736.GG12592@brightrain.aerifal.cx> <20110629200358.GN5036@port70.net> <20110816130350.GF26140@barfooze.de> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1313500070 22033 80.91.229.12 (16 Aug 2011 13:07:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Aug 2011 13:07:50 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-428-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 16 15:07:41 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QtJMr-0003DS-HL for gllmg-musl@lo.gmane.org; Tue, 16 Aug 2011 15:07:41 +0200 Original-Received: (qmail 5612 invoked by uid 550); 16 Aug 2011 13:07:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5604 invoked from network); 16 Aug 2011 13:07:40 -0000 Content-Disposition: inline In-Reply-To: <20110816130350.GF26140@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:427 Archived-At: On Tue, Aug 16, 2011 at 03:03:50PM +0200, Moritz Wilhelmy wrote: > Hello, > > While debugging mlmmj, my mailing list manager of choice, I noted that > it calls read(2) really, really often, in order to read a single byte > out of a fd, and then read the next byte, like this: > > open("/var/spool/mlmmj/foo/control/listaddress", O_RDONLY) = 4 > read(4, "f", 1) = 1 > read(4, "o", 1) = 1 > read(4, "o", 1) = 1 > read(4, "@", 1) = 1 Is it possibly implemented as a shell script? The way the shell "read" command works, it's required to perform byte-at-a-time reads like this. Otherwise, I'm guessing someone just foolishly turned off buffering on the FILE... Rich