]> Cypherpunks repositories - gostls13.git/commit
internal/poll: fall back on unsupported splice from unix socket
authorBen Burkert <ben@benburkert.com>
Wed, 5 Sep 2018 17:20:26 +0000 (10:20 -0700)
committerTobias Klauser <tobias.klauser@gmail.com>
Sat, 15 Sep 2018 09:25:07 +0000 (09:25 +0000)
commit1bf5796cae9e8f7b55402f199a1eec82a092abb7
treedb639b3b808e409e8ad5caa31fa3bc8073cd42ce
parent58c6afe075d74261dd67750e0aab5a1b8460839f
internal/poll: fall back on unsupported splice from unix socket

Gracefully fallback to a userspace copy when the kernel does not support
splice(2) on a unix domain socket. EINVAL is returned by the splice
syscall if it does not support unix domain sockets. Keeping the handled
return value as false when the first splice call fails with EINVAL will
cause the caller to fall back to a userspace copy.

Fixes #27513

Change-Id: I4b10c1900ba3c096cb32edb7c8a6044f468efb52
Reviewed-on: https://go-review.googlesource.com/133575
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/internal/poll/splice_linux.go