runtime: install SIGURG handler on C created threads
Precise stack scan uses SIGURG to trigger a stack scan. We need
to have Go signal handler installed for SIGURG.
Change-Id: I08af281304aee13a7f37ed0654a985a31a5fe024
Reviewed-on: https://go-review.googlesource.com/c/159097
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/go/runtime/signal_unix.go b/libgo/go/runtime/signal_unix.go
index 2f89c7c..12e4315 100644
--- a/libgo/go/runtime/signal_unix.go
+++ b/libgo/go/runtime/signal_unix.go
@@ -142,8 +142,8 @@
}
// When built using c-archive or c-shared, only install signal
- // handlers for synchronous signals and SIGPIPE.
- if (isarchive || islibrary) && t.flags&_SigPanic == 0 && sig != _SIGPIPE {
+ // handlers for synchronous signals, SIGPIPE, and SIGURG.
+ if (isarchive || islibrary) && t.flags&_SigPanic == 0 && sig != _SIGPIPE && sig != _SIGURG {
return false
}