diff --git a/pkg/expect/expect.go b/pkg/expect/expect.go index ca7745dd40df..f7d53a95d18b 100644 --- a/pkg/expect/expect.go +++ b/pkg/expect/expect.go @@ -33,15 +33,21 @@ import ( const DEBUG_LINES_TAIL = 40 +var ( + ErrProcessRunning = fmt.Errorf("process is still running") +) + type ExpectProcess struct { cmd *exec.Cmd fpty *os.File wg sync.WaitGroup - mu sync.Mutex // protects lines and err - lines []string - count int // increment whenever new line gets added - err error + mu sync.Mutex // protects lines and err + lines []string + count int // increment whenever new line gets added + err error + exitErr error // process exit error + exitCode int // StopSignal is the signal Stop sends to the process; defaults to SIGKILL. StopSignal os.Signal