On Thu, May 24, 2007 at 11:50:35AM -0400, Clem Taylor wrote: > On 5/24/07, Paul Fox <[EMAIL PROTECTED]> 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
pgpHO5puJJ1og.pgp
Description: PGP signature
_______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
