You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question from Rob:
The accept4 system call has a in+out socklen_t *addrlen parameter.
In syscall_linux.go, we use it as an in parameter, but never read the result:
func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
nfd, err = accept4(fd, &rsa, &len, flags)
if err != nil {
return
}
sa, err = anyToSockaddr(&rsa)
if err != nil {
Close(nfd)
nfd = 0
}
return
}
Likewise in Darwin (https://golang.org/cl/68880043/).
Should we?
Or is func anyToSockaddr safe as-is? Why?