This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
cmn: Kill
pull/1842/head
Ethan Buchman
7 years ago
parent
42145a82bd
commit
092eb701c7
1 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
common/os.go
+ 6
- 0
common/os.go
View File
@ -50,6 +50,12 @@ func TrapSignal(cb func()) {
select
{
}
}
// Kill the running process by sending itself SIGTERM
func
Kill
(
)
error
{
pid
:=
os
.
Getpid
(
)
return
syscall
.
Kill
(
pid
,
syscall
.
SIGTERM
)
}
func
Exit
(
s
string
)
{
fmt
.
Printf
(
s
+
"\n"
)
os
.
Exit
(
1
)
Write
Preview
Loading…
Cancel
Save