public static void main(String[] args) throws Throwable {
    try {
      int namingPort = Integer.getInteger(DUnitLauncher.RMI_PORT_PARAM);
      int vmNum = Integer.getInteger(DUnitLauncher.VM_NUM_PARAM);
      int remoteStubPort = Integer.getInteger(DUnitLauncher.REMOTE_STUB_PORT_PARAM, 0);
      String geodeVersion = System.getProperty(DUnitLauncher.VM_VERSION_PARAM);
      int pid = OSProcess.getId();
      logger.info("VM" + vmNum + " is launching" + (pid > 0 ? " with PID " + pid : ""));
      if (!VersionManager.isCurrentVersion(geodeVersion)) {
        logger.info("This VM is using a Geode version {}",
            geodeVersion);
      }
      MasterRemote holder = (MasterRemote) Naming
          .lookup("//localhost:" + namingPort + "/" + DUnitLauncher.MASTER_PARAM);
      DUnitLauncher.init(holder);
      DUnitLauncher.locatorPort = holder.getLocatorPort();
      final RemoteDUnitVM dunitVM = new RemoteDUnitVM(remoteStubPort);
      final String name = "//localhost:" + namingPort + "/vm" + vmNum;
      Naming.rebind(name, dunitVM);
      JUnit4DistributedTestCase.initializeBlackboard();
      holder.signalVMReady();
      AvailablePortHelper.initializeUniquePortRange(vmNum + 2); // hacky, locator is -2
      // This loop is here so this VM will die even if the master is mean killed.
      while (!stopMainLoop) {
        holder.ping();
        Thread.sleep(1000);
      }
    } catch (Throwable t) {
      logger.info("VM is exiting with error", t);
      ExitCode.FATAL.doSystemExit();
    } finally {
      logger.info("VM is exiting");
    }
  }
tells the main() loop to exit
geode-dunit/src/main/java/org/apache/geode/test/dunit/internal/ChildVM.java