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