From 73df946d56c74384511a194dd01dbe099584fd1a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 15:14:23 +0200 Subject: Adding upstream version 1.16.10. Signed-off-by: Daniel Baumann --- src/runtime/testdata/testwinsignal/main.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/runtime/testdata/testwinsignal/main.go (limited to 'src/runtime/testdata/testwinsignal') diff --git a/src/runtime/testdata/testwinsignal/main.go b/src/runtime/testdata/testwinsignal/main.go new file mode 100644 index 0000000..d8cd884 --- /dev/null +++ b/src/runtime/testdata/testwinsignal/main.go @@ -0,0 +1,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) +} -- cgit v1.2.3