1 // Copyright 2009 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.
12 func maxListenerBacklog() int {
13 // TODO: Implement this
14 // NOTE: Never return a number bigger than 1<<16 - 1. See issue 5030.
15 return syscall
.SOMAXCONN
18 func sysSocket(family
, sotype
, proto
int) (syscall
.Handle
, error
) {
19 // See ../syscall/exec_unix.go for description of ForkLock.
20 syscall
.ForkLock
.RLock()
21 s
, err
:= socketFunc(family
, sotype
, proto
)
23 syscall
.CloseOnExec(s
)
25 syscall
.ForkLock
.RUnlock()
27 return syscall
.InvalidHandle
, os
.NewSyscallError("socket", err
)