blob: d8cd884ffac638cf5ff077915e804bc178fd51af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package main
import (
"fmt"
"os"
"os/signal"
"time"
)
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c)
fmt.Println("ready")
sig := <-c
time.Sleep(time.Second)
fmt.Println(sig)
}
|