code: func (nc *nspawnCluster) machinePID(name string) (int, error) {
  	for i := 0; i < 100; i++ {
  		mach := fmt.Sprintf("%s%s", nc.name, name)
  		stdout, stderr, err := run(fmt.Sprintf("machinectl show -p Leader %s", mach))
  		if err != nil {
  			if i != -1 {
  				time.Sleep(100 * time.Millisecond)
  				continue
  			}
  			return -1, fmt.Errorf("failed detecting machine %s status: %v\nstdout: %s\nstderr: %s", mach, err, stdout, stderr)
  		}
  
  		out := strings.SplitN(strings.TrimSpace(stdout), "=", 2)
  		return strconv.Atoi(out[1])
  	}
  	return -1, fmt.Errorf("unable to detect machine PID")
  }
docs: // wait up to 10s for a machine to be started