private void checkOtherPid(final int otherPid) throws FileAlreadyExistsException {
    if (ignoreIsPidAlive() || otherPid != 0 && isProcessAlive(otherPid)) {
      throw new FileAlreadyExistsException("Pid file already exists: " + pidFile + " for "
          + (otherPid > 0 ? "process " + otherPid : "unknown process"));
    }
  }
Creates a new pid file and writes this process's pid into it.

@param force if true then the pid file will be replaced if it already exists it

@throws FileAlreadyExistsException if the pid file already exists and force is false
@throws IOException if unable to create or write to the file
geode-core/src/main/java/org/apache/geode/internal/process/LocalProcessLauncher.java