diff --git a/common/signals.go b/common/signals.go index fdc49119..f92f3f60 100644 --- a/common/signals.go +++ b/common/signals.go @@ -24,7 +24,7 @@ func SignalHandlerLoop(ss ...SignalReceiver) { for _, subsystem := range ss { subsystem.Stop() } - os.Exit(0) + return case syscall.SIGQUIT: stacklen := runtime.Stack(buf, true) Info.Printf("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end\n", buf[:stacklen]) diff --git a/weaver/main.go b/weaver/main.go index ecdbd89d..02b79538 100644 --- a/weaver/main.go +++ b/weaver/main.go @@ -112,6 +112,7 @@ func main() { if prof != "" { p := *profile.CPUProfile p.ProfilePath = prof + p.NoShutdownHook = true defer profile.Start(&p).Stop() }