(childPid int)
| 651 | } |
| 652 | |
| 653 | func (p *initProcess) waitForChildExit(childPid int) error { |
| 654 | status, err := p.cmd.Process.Wait() |
| 655 | if err != nil { |
| 656 | _ = p.cmd.Wait() |
| 657 | return err |
| 658 | } |
| 659 | if !status.Success() { |
| 660 | _ = p.cmd.Wait() |
| 661 | return &exec.ExitError{ProcessState: status} |
| 662 | } |
| 663 | |
| 664 | process, err := os.FindProcess(childPid) |
| 665 | if err != nil { |
| 666 | return err |
| 667 | } |
| 668 | p.cmd.Process = process |
| 669 | p.process.ops = p |
| 670 | return nil |
| 671 | } |
| 672 | |
| 673 | type mountSourceRequestFn func(*configs.Mount) (*mountSource, error) |
| 674 |