Linux and sendfile

Jeff Macdonald jeff.macdonald at virtualbuilder.com
Tue Oct 29 17:29:26 EST 2002


Hmmm.... I'm thinking I'm braindead. read may not return the number of
bytes requested, write should always return the number of bytes written,
and that should be the number requested or it is an error. Can somebody
ease my mind? :-)

On Tue, 2002-10-29 at 16:28, Jeff Macdonald wrote:
> Hi all,
> I'm hoping there are some fellow programmers here that have used the
> sendfile system call. What I'm wondering is should I treat sendfile like
> write when the out_fd is a socket. By that, I mean even if I specifiy N
> count bytes, sendfile might only send < N bytes and if it does, I should
> call sendfile again.
> 
> Here's the prototype:
> ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
> 
> 
> 
> 
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss





More information about the gnhlug-discuss mailing list