github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/poll/sock_cloexec_accept.go (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This file implements accept for platforms that provide a fast path for 6 // setting SetNonblock and CloseOnExec, but don't necessarily have accept4. 7 // This is the code we used for accept in Go 1.17 and earlier. 8 // On Linux the accept4 system call was introduced in 2.6.28 kernel, 9 // and our minimum requirement is 2.6.32, so we simplified the function. 10 // Unfortunately, on ARM accept4 wasn't added until 2.6.36, so for ARM 11 // only we continue using the older code. 12 13 //go:build linux && arm 14 15 package poll