aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/netpoll_solaris.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-05-19 17:44:35 -0700
committerGopher Robot <gobot@golang.org>2023-05-20 21:27:51 +0000
commit58315a771a645359d2173f9555d4a606e6613158 (patch)
tree2aa0c4ac7106e77d601fdb12af2fbb69eaa1414d /src/runtime/netpoll_solaris.go
parent2ec648aa8c42d1215ddf59c6a461b21fb6723b74 (diff)
downloadgo-58315a771a645359d2173f9555d4a606e6613158.tar.gz
go-58315a771a645359d2173f9555d4a606e6613158.zip
runtime: consolidate on a single closeonexec definition
Now that we implement fcntl on all Unix systems, we can write closeonexec that uses it. This lets us remove a bunch of assembler code. Change-Id: If35591df535ccfc67292086a9492f0a8920e3681 Reviewed-on: https://go-review.googlesource.com/c/go/+/496081 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/runtime/netpoll_solaris.go')
-rw-r--r--src/runtime/netpoll_solaris.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/netpoll_solaris.go b/src/runtime/netpoll_solaris.go
index 41b2f474ac..13c7ffc2ca 100644
--- a/src/runtime/netpoll_solaris.go
+++ b/src/runtime/netpoll_solaris.go
@@ -121,7 +121,7 @@ var portfd int32 = -1
func netpollinit() {
portfd = port_create()
if portfd >= 0 {
- fcntl(portfd, _F_SETFD, _FD_CLOEXEC)
+ closeonexec(portfd)
return
}