Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
130bccc7
Commit
130bccc7
authored
May 06, 2016
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: flush trace and CPU profile data when force-qutting
Also reduce log messages a little bit.
parent
ae9ed5c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
cmd.go
cmd/utils/cmd.go
+2
-4
No files found.
cmd/utils/cmd.go
View file @
130bccc7
...
@@ -73,15 +73,13 @@ func StartNode(stack *node.Node) {
...
@@ -73,15 +73,13 @@ func StartNode(stack *node.Node) {
<-
sigc
<-
sigc
glog
.
V
(
logger
.
Info
)
.
Infoln
(
"Got interrupt, shutting down..."
)
glog
.
V
(
logger
.
Info
)
.
Infoln
(
"Got interrupt, shutting down..."
)
go
stack
.
Stop
()
go
stack
.
Stop
()
logger
.
Flush
()
for
i
:=
10
;
i
>
0
;
i
--
{
for
i
:=
10
;
i
>
0
;
i
--
{
<-
sigc
<-
sigc
if
i
>
1
{
if
i
>
1
{
glog
.
V
(
logger
.
Info
)
.
Infoln
(
"Already shutting down, please be patient."
)
glog
.
V
(
logger
.
Info
)
.
Infof
(
"Already shutting down, interrupt %d more times for panic."
,
i
-
1
)
glog
.
V
(
logger
.
Info
)
.
Infoln
(
"Interrupt"
,
i
-
1
,
"more times to induce panic."
)
}
}
}
}
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"
)
debug
.
LoudPanic
(
"boom"
)
}()
}()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment