vendor: pkg: signalutils: add platform specific SetDumpStackSignal()

This commit is contained in:
Yousong Zhou
2020-02-26 11:36:48 +08:00
parent 28249f615c
commit c41bf6f104
2 changed files with 19 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
// +build !windows
package signalutils
import (
"syscall"
"yunion.io/x/log"
"yunion.io/x/pkg/utils"
)
func SetDumpStackSignal() {
RegisterSignal(func() {
utils.DumpAllGoroutineStack(log.Logger().Out)
}, syscall.SIGUSR1)
}
+4
View File
@@ -0,0 +1,4 @@
package signalutils
func SetDumpStackSignal() {
}