Wait waits for the process to exit.
()
| 181 | |
| 182 | // Wait waits for the process to exit. |
| 183 | func (p *Process) Wait() error { |
| 184 | state, err := p.execCmd.Process.Wait() |
| 185 | if err != nil { |
| 186 | return xerrors.Errorf("process exited with error: %w", err) |
| 187 | } |
| 188 | if state.ExitCode() != 0 { |
| 189 | return ErrNonZeroExitCode |
| 190 | } |
| 191 | return nil |
| 192 | } |
no outgoing calls