• Ben Burkert's avatar
    internal/poll: disable splice on old linux versions · 92bdfab7
    Ben Burkert authored
    The splice syscall is buggy prior to linux 2.6.29. Instead of returning
    0 when reading a closed socket, it returns EAGAIN.  While it is possible
    to detect this (HAProxy falls back to recv), it is simpiler to avoid
    using splice all together. the "fcntl(fd, F_GETPIPE_SZ)" syscall is used
    detect buggy versions of splice as the syscall returns EINVAL on
    versions prior to 2.6.35.
    
    Fixes #25486
    
    Change-Id: I860c029f13de2b09e95a7ba39b76ac7fca91a195
    Reviewed-on: https://go-review.googlesource.com/113999Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    92bdfab7
Name
Last commit
Last update
..
export_posix_test.go Loading commit data...
export_test.go Loading commit data...
export_windows_test.go Loading commit data...
fd.go Loading commit data...
fd_io_plan9.go Loading commit data...
fd_mutex.go Loading commit data...
fd_mutex_test.go Loading commit data...
fd_plan9.go Loading commit data...
fd_poll_nacljs.go Loading commit data...
fd_poll_runtime.go Loading commit data...
fd_posix.go Loading commit data...
fd_posix_test.go Loading commit data...
fd_unix.go Loading commit data...
fd_windows.go Loading commit data...
fd_windows_test.go Loading commit data...
hook_cloexec.go Loading commit data...
hook_unix.go Loading commit data...
hook_windows.go Loading commit data...
sendfile_bsd.go Loading commit data...
sendfile_linux.go Loading commit data...
sendfile_solaris.go Loading commit data...
sendfile_windows.go Loading commit data...
sock_cloexec.go Loading commit data...
sockopt.go Loading commit data...
sockopt_linux.go Loading commit data...
sockopt_unix.go Loading commit data...
sockopt_windows.go Loading commit data...
sockoptip.go Loading commit data...
splice_linux.go Loading commit data...
strconv.go Loading commit data...
sys_cloexec.go Loading commit data...
writev.go Loading commit data...
writev_test.go Loading commit data...