private OptionalInt readPid(Path pidFile) {
    try {
      return OptionalInt.of(ProcessUtils.readPid(pidFile));
    } catch (Exception e) {
      // process may have terminated if there is no pid file
      return OptionalInt.empty();
    }
  }
Provides methods for stopping and awaiting the termination of server and locator processes.
geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/GfshStopper.java