Permalink
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 204 Bytes
package main
import (
"os"
"os/signal"
"syscall"
)
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM)
// Block until a signal is received.
<-c
}