busybox 1.5.x ash read builtin only reads one character at a time?

Clem Taylor clem.taylor at gmail.com
Thu May 24 15:50:35 UTC 2007


On 5/24/07, Paul Fox <pgf at 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.

                          --Clem



More information about the busybox mailing list