code: func (p *Pod) ContainerPid1() (pid int, err error) {
  	// rkt supports two methods to find the container's PID 1: the pid
  	// file and the ppid file.
  	// The ordering is not important and only one of them must be supplied.
  	// See Documentation/devel/stage1-implementors-guide.md
  	for {
  		var ppid int
  
  		pid, err = p.readIntFromFile("pid")
  		if err == nil {
  			return
  		}
  
  		ppid, err = p.readIntFromFile("ppid")
  		if err != nil && !os.IsNotExist(err) {
  			return -1, err
  		}
  		if err == nil {
  			pid, err = getChildPID(ppid)
  			if err == nil {
  				return pid, nil
  			}
  			if _, ok := err.(ErrChildNotReady); !ok {
  				return -1, err
  			}
  		}
  
  		// There's a window between a pod transitioning to run and the pid file being created by stage1.
  		// The window shouldn't be large so we just delay and retry here.  If stage1 fails to reach the
  		// point of pid file creation, it will exit and p.isRunning() becomes false since we refreshState below.
  		time.Sleep(time.Millisecond * 100)
  
  		if err := p.refreshState(); err != nil {
  			return -1, err
  		}
  
  		if !p.isRunning() {
  			return -1, fmt.Errorf("pod %v is not running anymore", p.UUID)
  		}
  	}
  }
docs: // ContainerPid1 returns the pid of the process with pid 1 in the pod.
  // Note: This method blocks indefinitely and refreshes the pod state.