master
sre 4 years ago
parent 6c76bc7e07
commit 382b98da58

@ -24,11 +24,11 @@ pong -a www.baidu.com -p 443 -k tcp -t 3
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill)
for {
select {
case s := <-c:
fmt.Println("ctc")
signal.Notify(c, os.Interrupt, os.Kill)
fmt.Println("Got signal:", s)
os.Exit(0)
default:

Loading…
Cancel
Save