code: func WritePid(pid int, filename string) error {
  	// write pid file as specified in
  	// Documentation/devel/stage1-implementors-guide.md
  	out, err := os.Getwd()
  	if err != nil {
  		return errwrap.Wrap(errors.New("cannot get current working directory"), err)
  	}
  	err = ioutil.WriteFile(filepath.Join(out, filename),
  		[]byte(fmt.Sprintf("%d\n", pid)), 0644)
  	if err != nil {
  		return errwrap.Wrap(errors.New("cannot write pid file"), err)
  	}
  	return nil
  }
docs: // WritePid writes the given pid to $PWD/{filename}