diff --git a/cmd/ghcs/common.go b/cmd/ghcs/common.go index ca62c538a..229e04c78 100644 --- a/cmd/ghcs/common.go +++ b/cmd/ghcs/common.go @@ -111,6 +111,10 @@ func ask(qs []*survey.Question, response interface{}) error { if err == terminal.InterruptErr { self, _ := os.FindProcess(os.Getpid()) _ = self.Signal(os.Interrupt) // assumes POSIX + + // Suspend the goroutine, to avoid a race between + // return from main and async delivery of INT signal. + select {} } return err }