Wait blocks until the detached process exits and attaches recent log output to failures.
()
| 52 | |
| 53 | // Wait blocks until the detached process exits and attaches recent log output to failures. |
| 54 | func (p *DetachedProcess) Wait() error { |
| 55 | if p == nil || p.process == nil { |
| 56 | return nil |
| 57 | } |
| 58 | p.startWait() |
| 59 | <-p.done |
| 60 | return p.waitErr |
| 61 | } |
| 62 | |
| 63 | // Done closes after the detached child has been reaped. |
| 64 | func (p *DetachedProcess) Done() <-chan struct{} { |