Sendfile revisited

Jeff Macdonald jeff.macdonald at virtualbuilder.com
Tue Dec 17 12:28:57 EST 2002


Hi,
Someone mentioned the Linux Journal article (it's Jan 2003 issue, not
Dec 2002). I just got a chance to read it and it looks like there would
be a problem with the code example:

if((cnt=sendfile(client,fd,&off,BUFF_SIZE))) < 0) { /* handle error */ }

There is no guarentee that the total buffer would be sent.

So the article is a good example of what sendfile is all about, but the
code needs some work.


-- 
Jeff Macdonald <jeff.macdonald at virtualbuilder.com>
Into birding? Check out http://www.migratus.com




More information about the gnhlug-discuss mailing list