On 2017-03-13, Grant Edwards <grant.b.edwa...@gmail.com> wrote:

> After upgrading to a new version of busybox (1.25.1), I now have an
> odd problem with 'cat'.  When stdout is a file, it _appears_ to be
> doing a seek to the beginning of the output file between input files.

[...]

> But, strace doesn't show any seeks.  I see that 'cat' is using
> sendfile mutiple times.  According to sendfile(2):
>
>    In Linux kernels before 2.6.33, out_fd must refer to a  socket.   Since
>    Linux  2.6.33  it can be any file.  If it is a regular file, then send‐
>    file() changes the file offset appropriately.
>
> Apparently "change file file offset apprpriatly" means it gets reset
> to zero after every call to sendfile().  I take it this implementation
> of 'cat' works for other people?

Apologies for the noise -- I finally stumbled across
CONFIG_FEATURE_USE_SENDFILE, and disabling that fixes the 'cat'
problem with 2.6.33 kernels.

-- 
Grant Edwards               grant.b.edwards        Yow! I smell a RANCID
                                  at               CORN DOG!
                              gmail.com            

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to