Sign in
go
/
go
/
go1.16.3
/
.
/
src
/
runtime
/
testdata
/
testwinsignal
/
main.go
blob: d8cd884ffac638cf5ff077915e804bc178fd51af [
file
] [
log
] [
blame
]
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)
}