r3944: Fix the problem we get on Linux where sendfile fails, but we've already sent the
commit78236382f7ffe08d7924907be49493779521837f
authorJeremy Allison <jra@samba.org>
Wed, 24 Nov 2004 22:05:59 +0000 (24 22:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:26 +0000 (10 10:53 -0500)
treeb60d6c3ddb243eea6fac22e0d594a05810cbbf57
parent412ff4a129c5e719aa4d4e4856500ff59c82b939
r3944: Fix the problem we get on Linux where sendfile fails, but we've already sent the
header using send(). As our implementation of sendfile can't return EINTR (it
restarts in that case) use an errno of EINTR to signal the linux sendfile fail
after header case. When that happens send the rest of the data and then turn
off sendfile. Sendfile should be safe to enable on all systems now (even though
it may not help in all performance cases).
Jeremy.
source/lib/sendfile.c
source/smbd/reply.c