1
0
Fork 0

Use less code to catch the interrupt signal

This commit is contained in:
Gregory Eremin 2015-10-14 04:17:22 +03:00
parent a2bfadfa66
commit 86c1b42540
1 changed files with 1 additions and 6 deletions

View File

@ -26,10 +26,5 @@ func main() {
sig := make(chan os.Signal)
signal.Notify(sig, os.Interrupt)
for s := range sig {
if s == os.Interrupt {
return
}
}
<-sig
}