On Mon, 19 Feb 2001, Jeff Garzik wrote:
> > But, unfortunately, sendfile (in 2.2 and 2.4) appears not
> > to support sendfile(2)ing a device:
>
> Correct... sendfile(2) is only for sources/destinations that can be
> ripped through the page cache.
I knew that, but was surprised that /dev/zero did
On Mon, 19 Feb 2001, Matthew Kirkwood wrote:
> I'm looking for a fast way to initialise a file to zeroes
> (without holes) and reckoned that sendfile from /dev/zero
> would be the way to go.
>
> But, unfortunately, sendfile (in 2.2 and 2.4) appears not
> to support sendfile(2)ing a device:
Corre
Hi,
I'm looking for a fast way to initialise a file to zeroes
(without holes) and reckoned that sendfile from /dev/zero
would be the way to go.
But, unfortunately, sendfile (in 2.2 and 2.4) appears not
to support sendfile(2)ing a device:
$ cat foo.c
main()
{
if(sendfile(1, 0, 0, 1024) <
3 matches
Mail list logo