code: func (file *LockFile) WritePid() (err error) {
  	if _, err = file.Seek(0, os.SEEK_SET); err != nil {
  		return
  	}
  	var fileLen int
  	if fileLen, err = fmt.Fprint(file, os.Getpid()); err != nil {
  		return
  	}
  	if err = file.Truncate(int64(fileLen)); err != nil {
  		return
  	}
  	err = file.Sync()
  	return
  }
docs: // WritePid writes current process id to an open file.