Archived
1
0

Commited the wrong file.

This commit is contained in:
Jip J. Dekker 2013-10-01 18:08:01 +02:00
parent 18983c11df
commit 0e926c0b3f

View File

@ -1,27 +0,0 @@
package main
import "fmt"
import "os"
import "os/signal"
import "syscall"
func main() {
sigs := make(chan os.Signal, 1000000)
done := make(chan bool, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
go func() {
for i := 0; i < 3; i++ {
sig := <-sigs
fmt.Println()
fmt.Println(sig)
}
done <- true
}()
fmt.Println("awaiting signal")
<-done
fmt.Println("exiting")
}