/** * Attempt to clean up after ctrl-C otherwise * terminal is left in bad shape */ func signalCatcher(liner *liner.State) { ch := make(chan os.Signal) signal.Notify(ch, syscall.SIGINT) <-ch liner.Close() os.Exit(0) }