Commit 956535f5 authored by Ian Lance Taylor's avatar Ian Lance Taylor

runtime: implement setsigstack for Solaris

Change-Id: I0280d478b7d0a59d8e2082aa87fab6d7d9f36a18
Reviewed-on: https://go-review.googlesource.com/18158Reviewed-by: default avatarAram Hăvărneanu <aram@mgk.ro>
parent e2093cde
...@@ -280,7 +280,14 @@ func setsig(i int32, fn uintptr, restart bool) { ...@@ -280,7 +280,14 @@ func setsig(i int32, fn uintptr, restart bool) {
} }
func setsigstack(i int32) { 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 { func getsig(i int32) uintptr {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment