]> Cypherpunks repositories - gostls13.git/commit
net: update file read position after sendfile syscall
authorTobias Klauser <tklauser@distanz.ch>
Mon, 11 Jun 2018 12:41:58 +0000 (14:41 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 12 Jun 2018 13:41:58 +0000 (13:41 +0000)
commit29b631e6f4fb3729cf4b369bcf47316f0d426845
treebed757c4d088bd613b4ac01d7c5338fe58a7793e
parent9ef9765c168c8561b98dc41c25eb8ae83abfcd7a
net: update file read position after sendfile syscall

On dragonfly, freebsd and solaris the sendfile syscall does not update
the read position of the source fd. Update it after sendfile so
successive calls start at the correct position.

Fixes #25809

Change-Id: Iaac79f89704b75b8038d4bb60eaf793a262cdd8f
Reviewed-on: https://go-review.googlesource.com/117895
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/sendfile_test.go
src/net/sendfile_unix_alt.go