[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    AW: AW: Why doesn't "cat a b > foo" work?
From:       Walter Harms <wharms () bfs ! de>
Date:       2021-01-20 17:05:20
Message-ID: 5006c4d5d2584a11a95614c3d83bbf10 () bfs ! de
[Download RAW message or body]

So 2.6.33+ has a possible bug,
the nice thing it is nothing what i maintain here :)

thx
________________________________________
Von: busybox <busybox-bounces@busybox.net> im Auftrag von Grant Edwards <grant.b.edwards@gmail.com>
Gesendet: Mittwoch, 20. Januar 2021 17:15:38
An: busybox@busybox.net
Betreff: Re: AW: Why doesn't "cat a b > foo" work?

On 2021-01-20, Walter Harms <wharms@bfs.de> wrote:

> can you give a hint what kernel version is problematic?

NB: prior to 2.6.33, sendfile() could only be used with a socket as
the destination.

I'm seeing the failure with 2.6.33.7

In 2.6.33.7, when used with a normal file as the output, it always
writes the data to offset 0 in the file.

That's fine if you only call it once and then close the output
fd. However, if you call it multiple times (as busybox 'cat' does when
copying multiple files), then you don't get the expected result. The
contents of the input files are not concatenated. Instead the contents
of each input file overwites the existing contents of the output file
starting at offset 0.

I do not know when that was fixed in the Linux kernel.

--
Grant

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic