[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: busybox 1.5.x ash read builtin only reads one character at a time?
From: Luciano Rocha <strange () nsk ! no-ip ! org>
Date: 2007-05-24 16:48:14
Message-ID: 20070524164814.GA26110 () bit ! office ! eurotux ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thu, May 24, 2007 at 11:50:35AM -0400, Clem Taylor wrote:
> On 5/24/07, Paul Fox <pgf@brightstareng.com> wrote:
> > ash is certainly doing character-at-a-time reads. looking at the
> > bash code, it appears to do buffered input if it can. (though
> > it's not clear to me it will always get a whole line -- i.e., i
> > think it would break if the /proc entry were quite long.) i
> > assume you've tried this with bash, and it works? it's
> > non-trivial to fix, since the current algorithm in ash handles
> > the -n and -t options trivially.
>
> Yeah it works with bash, but I'm not about to put bash on my embedded
> system :-). I agree that this is not an ash bug, reading one byte at a
> time seems perfectly reasonable to me. The problem is an unexpected
> behavior of /proc. Some /proc entries work just fine, the problem may
> be isolated to /proc/sys files.
Actually, bash has some problems with /proc, too. The startup scripts in
RedHat use explicitly cat instead of read or $(< file) because of that.
--
lfr
0/0
[Attachment #5 (application/pgp-signature)]
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic