Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110816131610.GG26140@barfooze.de>
Date: Tue, 16 Aug 2011 15:16:10 +0200
From: Moritz Wilhelmy <ml+musl@...f.de>
To: musl@...ts.openwall.com
Subject: Re: Anti-bloat side project

On Tue, Aug 16, 2011 at 09:06:43 -0400, Rich Felker wrote:
> 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...

In fact, it really is a C program, and sadly, it seems they really
implement it that way (by greping over the code for about 30 seconds);

See src/mygetline.c on hg tip[1]:
 41         while(1) {
 42                 res = read(fd, &ch, 1);

Maybe coders need to be educated about how not to write code in order to
avoid (syscall-)bloat?

[1]: http://mlmmj.org/hg/mlmmj/file/tip/src/mygetline.c

	Moritz

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.