Hi,

On Sun, Sep 18, 2011 at 10:58:23PM +0400, Alexander Gordeev wrote:
> BTW you shouldn't even expect to read() 6 bytes from file at once.

For normal files, read() will never read less than requested, unless you
hit an error or eof.

> $ strace -f -e trace=read,write sh -c 'dd if=/dev/urandom bs=1 count=6
> | cat > /dev/null'

/dev/urandom is not a *file*...

> cat tries to read 32768 but gets 1 byte on every read.

... and cat does not read from /dev/urandom in the first place here, but 
from the pipe from dd.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: pgpgd6wzN41Vm.pgp
Description: PGP signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to