freebsd-skq/lib/libc_r
alfred 13d622545c Fix a number of subtle and evil bugs in the libc_r wrapping of sendfile(2).
o) Since we unwrap the sendfile syscall, check the return value of
   writev(2) to see if it didn't complete all the data.
   Previously if only a partial writev() succeeded, it would proceed
   to sendfile(2) even though the headers weren't completely sent.

o) Properly adjust the "bytes to send" to take into account sendfile(2)'s
   behaviour of counting the headers against the bytes to be transfered
   from the file.

o) Correct the problem where EAGAIN was being returned from _sys_sendfile(2)
   however the wrapper didn't update the 'sent bytes' parameter to take into
   account for it.  This is because sendfile can return EAGAIN even though
   it has actually transfered data.

Special thanks to Justin Erenkrantz <jerenkrantz@apache.org> for bringing
this to my attention and giving an excellent way to reproduce the problem.

PR: kern/32684
MFC After: 1 week
2001-12-12 08:02:24 +00:00
..
arch Change #include "DEFS.h" to <machine/asm.h>. 2001-10-25 01:30:54 +00:00
man Describe handling of NULLs passed to pthread_setcancelstate(). 2001-11-05 08:21:32 +00:00
sys $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
test Mark some functions as __printflike() and/or taking const char * arguments 2001-08-20 12:53:36 +00:00
uthread Fix a number of subtle and evil bugs in the libc_r wrapping of sendfile(2). 2001-12-12 08:02:24 +00:00
Makefile Add weak definitions for wrapped system calls. In general: 2001-01-24 13:03:38 +00:00