/** * Find out if a process exists. * @param pid the id of the process to check for * @return true if the process exists; false if it does not. */ static boolean exists2(int pid) { if (pureMode) { throw new RuntimeException(LocalizedStrings.OSProcess_EXISTS_NOT_ALLOWED_IN_PURE_JAVA_MODE.toLocalizedString()); } checkPid(pid); if (reapPid(pid)) { try { pids.remove(Integer.valueOf(pid)); } catch (Exception ignore) {} String trace = System.getProperty("com.gemstone.gemfire.internal.OSProcess.trace"); if (trace != null && trace.length() > 0) { System.out.println("reaped pid: " + pid); } } return nativeExists(pid); }
/** * Find out if a process exists. * @param pid the id of the process to check for * @return true if the process exists; false if it does not. */ static public boolean exists(int pid) { if (pureMode) { throw new RuntimeException(LocalizedStrings.OSProcess_EXISTS_NOT_ALLOWED_IN_PURE_JAVA_MODE.toLocalizedString()); } checkPid(pid); if (reapPid(pid)) { try { pids.remove(Integer.valueOf(pid)); } catch (Exception ignore) {} String trace = System.getProperty("com.gemstone.gemfire.internal.OSProcess.trace"); if (trace != null && trace.length() > 0) { System.out.println("reaped pid: " + pid); } } return nativeExists(pid); }
Object o = it.next(); int pid = ((Integer)o).intValue(); if (reapPid(pid)) { try { it.remove();
Object o = it.next(); int pid = ((Integer)o).intValue(); if (reapPid(pid)) { try { it.remove();