Lines Matching full:signal
10 "os/signal"
14 // Set up channel on which to send signal notifications.
15 // We must use a buffered channel or risk missing the signal
16 // if we're not ready to receive when the signal is sent.
17 c := make(chan os.Signal, 1)
18 signal.Notify(c, os.Interrupt)
20 // Block until a signal is received.
22 fmt.Println("Got signal:", s)
26 // Set up channel on which to send signal notifications.
27 // We must use a buffered channel or risk missing the signal
28 // if we're not ready to receive when the signal is sent.
29 c := make(chan os.Signal, 1)
33 signal.Notify(c)
35 // Block until any signal is received.
37 fmt.Println("Got signal:", s)