diff options
author | Felix Lange <fjl@twurst.com> | 2016-05-06 17:04:52 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-05-06 17:16:47 +0800 |
commit | 130bccc7630a6f6ec7990900bc9dc9bce410a6ad (patch) | |
tree | 5303027d1d275d6696153da097270928617431d1 /cmd | |
parent | ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0 (diff) | |
download | go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar.gz go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar.bz2 go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar.lz go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar.xz go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.tar.zst go-tangerine-130bccc7630a6f6ec7990900bc9dc9bce410a6ad.zip |
cmd/utils: flush trace and CPU profile data when force-qutting
Also reduce log messages a little bit.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/utils/cmd.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index d331f762f..9e2b14f56 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -73,15 +73,13 @@ func StartNode(stack *node.Node) { <-sigc glog.V(logger.Info).Infoln("Got interrupt, shutting down...") go stack.Stop() - logger.Flush() for i := 10; i > 0; i-- { <-sigc if i > 1 { - glog.V(logger.Info).Infoln("Already shutting down, please be patient.") - glog.V(logger.Info).Infoln("Interrupt", i-1, "more times to induce panic.") + glog.V(logger.Info).Infof("Already shutting down, interrupt %d more times for panic.", i-1) } } - glog.V(logger.Error).Infof("Force quitting: this might not end so well.") + debug.Exit() // ensure trace and CPU profile data is flushed. debug.LoudPanic("boom") }() } |