|
|
|
|
@ -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:
|
|
|
|
|
|