MCPcopy
hub / github.com/opencontainers/runc / waitForChildExit

Method waitForChildExit

libcontainer/process_linux.go:653–671  ·  view source on GitHub ↗
(childPid int)

Source from the content-addressed store, hash-verified

651}
652
653func (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
673type mountSourceRequestFn func(*configs.Mount) (*mountSource, error)
674

Callers 1

startMethod · 0.95

Calls 1

WaitMethod · 0.80

Tested by

no test coverage detected