Merge pull request #196 from laijs/simplify-return

Simplify the return on process wait
This commit is contained in:
Mrunal Patel 2015-08-12 21:17:35 -07:00
commit 744a6b0e7b
1 changed files with 2 additions and 4 deletions

View File

@ -138,11 +138,9 @@ func (p *setnsProcess) terminate() error {
func (p *setnsProcess) wait() (*os.ProcessState, error) { func (p *setnsProcess) wait() (*os.ProcessState, error) {
err := p.cmd.Wait() err := p.cmd.Wait()
if err != nil {
return p.cmd.ProcessState, err
}
return p.cmd.ProcessState, nil // Return actual ProcessState even on Wait error
return p.cmd.ProcessState, err
} }
func (p *setnsProcess) pid() int { func (p *setnsProcess) pid() int {