Пример #1
0
// Attempt to clean up after ctrl-C otherwise
// terminal is left in bad shape
func signalCatcher(c *api.Context) {
	ch := make(chan os.Signal)
	signal.Notify(ch, syscall.SIGINT)
	<-ch
	c.Close()
	os.Exit(0)
}