mirror of
https://github.com/golang/go
synced 2024-09-30 00:34:31 -06:00
runtime: implement setsigstack for Solaris
Change-Id: I0280d478b7d0a59d8e2082aa87fab6d7d9f36a18 Reviewed-on: https://go-review.googlesource.com/18158 Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
This commit is contained in:
parent
e2093cdeef
commit
956535f5cb
@ -280,7 +280,14 @@ func setsig(i int32, fn uintptr, restart bool) {
|
||||
}
|
||||
|
||||
func setsigstack(i int32) {
|
||||
throw("setsigstack")
|
||||
var sa sigactiont
|
||||
sigaction(i, nil, &sa)
|
||||
handler := *((*uintptr)(unsafe.Pointer(&sa._funcptr)))
|
||||
if handler == 0 || handler == _SIG_DFL || handler == _SIG_IGN || sa.sa_flags&_SA_ONSTACK != 0 {
|
||||
return
|
||||
}
|
||||
sa.sa_flags |= _SA_ONSTACK
|
||||
sigaction(i, &sa, nil)
|
||||
}
|
||||
|
||||
func getsig(i int32) uintptr {
|
||||
|
Loading…
Reference in New Issue
Block a user