...
Source file
src/net/main_cloexec_test.go
Documentation: net
1
2
3
4
5
6
7
8 package net
9
10 import "internal/poll"
11
12 func init() {
13 extraTestHookInstallers = append(extraTestHookInstallers, installAccept4TestHook)
14 extraTestHookUninstallers = append(extraTestHookUninstallers, uninstallAccept4TestHook)
15 }
16
17 var (
18
19 origAccept4 = poll.Accept4Func
20 )
21
22 func installAccept4TestHook() {
23 poll.Accept4Func = sw.Accept4
24 }
25
26 func uninstallAccept4TestHook() {
27 poll.Accept4Func = origAccept4
28 }
29
View as plain text