amend sys HandleSigKill
This commit is contained in:
parent
9574b3e083
commit
79ed312ca2
|
@ -110,9 +110,7 @@ func HandleTermChange() {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
func HandleSigKill() {
|
func HandleSigKill(done chan os.Signal) {
|
||||||
done := make(chan os.Signal, 1)
|
|
||||||
defer close(done)
|
|
||||||
signal.Notify(done, syscall.SIGINT, syscall.SIGTERM)
|
signal.Notify(done, syscall.SIGINT, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-done // Will block here until user hits ctrl+c
|
<-done // Will block here until user hits ctrl+c
|
||||||
|
|
Loading…
Reference in New Issue
Block a user