...
Source file
src/runtime/os_freebsd_amd64.go
Documentation: runtime
1
2
3
4
5 package runtime
6
7 import "internal/abi"
8
9 func cgoSigtramp()
10
11
12
13 func setsig(i uint32, fn uintptr) {
14 var sa sigactiont
15 sa.sa_flags = _SA_SIGINFO | _SA_ONSTACK | _SA_RESTART
16 sa.sa_mask = sigset_all
17 if fn == abi.FuncPCABIInternal(sighandler) {
18 if iscgo {
19 fn = abi.FuncPCABI0(cgoSigtramp)
20 } else {
21 fn = abi.FuncPCABI0(sigtramp)
22 }
23 }
24 sa.sa_handler = fn
25 sigaction(i, &sa, nil)
26 }
27
View as plain text