[lkml]   [2000]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject2.4 sendfile() not doing as manpage promises?
Hi everybody,

I tried to use sendfile() to send data from a tcp/ip socket to a file on
disk. This does not work, giving EINVAL.

Using the very fine kgdb product ( and my laptop
for remote debugging, I was able to trace this to this:


if (!in_inode->i_mapping->a_ops->readpage)
goto fput_in;

After some exploring with 'ddd' (a very nice graphical frontend for gdb,
which includes tools to display and traverse structs), I found that this
probably means that sendfile() can only be used to send files from
blockdevices which support mmap()-like functionality.

Is this correct? In that case, the wording of the manpage needs to be
changed, as it implies that 'either or both' of the filedescriptors can be


bert hubert

PowerDNS Versatile DNS Services
Trilab The Technology People
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:47    [W:0.041 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site