fix
This commit is contained in:
20
pkg/pprof/pprof_posix.go
Normal file
20
pkg/pprof/pprof_posix.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// +build !windows
|
||||
|
||||
package pprof
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func listenSignal() {
|
||||
signChan := make(chan os.Signal, 1)
|
||||
signal.Notify(signChan, syscall.SIGUSR1)
|
||||
for {
|
||||
<-signChan
|
||||
profile()
|
||||
memprofile()
|
||||
cpuprofile()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user