code: func applyOOMScoreAdj(pid int, oomScoreAdj int) error {
  	if pid < 0 {
  		return fmt.Errorf("invalid PID %d specified for oom_score_adj", pid)
  	}
  
  	var pidStr string
  	if pid == 0 {
  		pidStr = "self"
  	} else {
  		pidStr = strconv.Itoa(pid)
  	}
  
  	maxTries := 2
  	oomScoreAdjPath := path.Join("/proc", pidStr, "oom_score_adj")
  	value := strconv.Itoa(oomScoreAdj)
  	klog.V(4).Infof("attempting to set %q to %q", oomScoreAdjPath, value)
  	var err error
  	for i := 0; i < maxTries; i++ {
  		err = ioutil.WriteFile(oomScoreAdjPath, []byte(value), 0700)
  		if err != nil {
  			if os.IsNotExist(err) {
  				klog.V(2).Infof("%q does not exist", oomScoreAdjPath)
  				return os.ErrNotExist
  			}
  
  			klog.V(3).Info(err)
  			time.Sleep(100 * time.Millisecond)
  			continue
  		}
  		return nil
  	}
  	if err != nil {
  		klog.V(2).Infof("failed to set %q to %q: %v", oomScoreAdjPath, value, err)
  	}
  	return err
  }
docs: // Writes 'value' to /proc/<pid>/oom_score_adj. PID = 0 means self
  // Returns os.ErrNotExist if the `pid` does not exist.