]> Cypherpunks repositories - gostls13.git/commit
net: use WSASocket instead of socket call
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 23 Oct 2017 05:23:43 +0000 (16:23 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 7 Nov 2017 22:04:15 +0000 (22:04 +0000)
commit44623c2ece584d77a9e8338f5f0bec198a2bab60
treef5c91b4be60dc384f6461172c023782538ba4be3
parent9e76ce70701ceef8fbccfb953b33a2ae7fe0367c
net: use WSASocket instead of socket call

WSASocket (unlike socket call) allows to create sockets that
will not be inherited by child process. So call WSASocket to
save on using syscall.ForkLock and calling syscall.CloseOnExec.

Some very old versions of Windows do not have that functionality.
Call socket, if WSASocket failed, to support these.

Change-Id: I2dab9fa00d1a8609dd6feae1c9cc31d4e55b8cb5
Reviewed-on: https://go-review.googlesource.com/72590
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/go/build/deps_test.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/net/hook_windows.go
src/net/internal/socktest/sys_windows.go
src/net/main_windows_test.go
src/net/sock_windows.go