]> Cypherpunks repositories - gostls13.git/commit
internal/poll, net, syscall: use accept4 on illumos
authorTobias Klauser <tklauser@distanz.ch>
Fri, 16 Oct 2020 17:35:09 +0000 (19:35 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Fri, 16 Oct 2020 19:53:34 +0000 (19:53 +0000)
commit9cec50f50c29f5ef7264bf06ee7ac0991b4b36d6
treebd7c698ab7341041dfee1bbb43f1be7473c1ca39
parent41162be44a099803a870f9b6c147050594598d63
internal/poll, net, syscall: use accept4 on illumos

Illumos supports the accept4 syscall, use it in internal/poll.accept
like on other platforms.

Add Accept4 to package syscall despite the package being frozen. The
other option would have been to add this to internal/syscall/unix, but
adding it to syscall avoids duplicating a lot of code in internal/poll
and net/internal/socktest. Also, all other platforms supporting the
accept4 syscall already export Accept4.

Follow CL 97196, CL 40895 and CL 94295

Change-Id: I13b32f0163a683840c02b16722730d9dfdb98f56
Reviewed-on: https://go-review.googlesource.com/c/go/+/256101
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/internal/poll/hook_cloexec.go
src/internal/poll/sock_cloexec.go
src/internal/poll/sys_cloexec.go
src/net/internal/socktest/sys_cloexec.go
src/net/main_cloexec_test.go
src/net/sock_cloexec.go
src/net/sys_cloexec.go
src/runtime/cgo/cgo.go
src/syscall/syscall_illumos.go