diff --git a/cmd/ghcs/common.go b/cmd/ghcs/common.go index b61d8bb81..e8927464a 100644 --- a/cmd/ghcs/common.go +++ b/cmd/ghcs/common.go @@ -109,6 +109,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 }