From: bert hubert <ahu@ds9a.nl>
To: linux-kernel@vger.kernel.org
Subject: 2.4 sendfile() not doing as manpage promises?
Date: Sun, 19 Nov 2000 00:15:58 +0100 [thread overview]
Message-ID: <20001119001558.B10579@home.ds9a.nl> (raw)
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 (http://kgdb.sourceforge.net) and my laptop
for remote debugging, I was able to trace this to this:
sys/filemap.c::sys_sendfile():
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
sockets.
Regards,
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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-11-18 22:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-18 23:15 bert hubert [this message]
2000-11-18 23:15 ` Dan Hollis
2000-11-19 0:53 ` bert hubert
2000-11-19 16:36 ` Andries Brouwer
2000-11-19 23:16 ` bert hubert
2000-11-20 1:11 ` Dan Hollis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20001119001558.B10579@home.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®