private static boolean hasMatchingEnvVars(@Nonnull OSProcess p, @Nonnull Map<String, String> modelEnvVars) throws WindowsOSProcessException { if (p instanceof WindowsOSProcess) { return ((WindowsOSProcess)p).hasMatchingEnvVars2(modelEnvVars); } else { // Should never happen, but there is a risk of getting such class during deserialization try { return p.hasMatchingEnvVars(modelEnvVars); } catch (WinpException e) { // likely a missing privilege throw new WindowsOSProcessException(e); } } } }
private static boolean hasMatchingEnvVars(@Nonnull OSProcess p, @Nonnull Map<String, String> modelEnvVars) throws WindowsOSProcessException { if (p instanceof WindowsOSProcess) { return ((WindowsOSProcess)p).hasMatchingEnvVars2(modelEnvVars); } else { // Should never happen, but there is a risk of getting such class during deserialization try { return p.hasMatchingEnvVars(modelEnvVars); } catch (WinpException e) { // likely a missing privilege throw new WindowsOSProcessException(e); } } } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for( OSProcess p : this) { if(p.getPid()<10) continue; // ignore system processes like "idle process" LOGGER.finest("Considering to kill "+p.getPid()); boolean matched; try { matched = p.hasMatchingEnvVars(modelEnvVars); } catch (WinpException e) { // likely a missing privilege LOGGER.log(FINEST," Failed to check environment variable match",e); continue; } if(matched) p.killRecursively(); else LOGGER.finest("Environment variable didn't match"); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for( OSProcess p : this) { if(p.getPid()<10) continue; // ignore system processes like "idle process" LOGGER.finest("Considering to kill "+p.getPid()); boolean matched; try { matched = p.hasMatchingEnvVars(modelEnvVars); } catch (WinpException e) { // likely a missing privilege LOGGER.log(FINEST," Failed to check environment variable match",e); continue; } if(matched) p.killRecursively(); else LOGGER.finest("Environment variable didn't match"); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) { if (p.getPid() < 10) { continue; // ignore system processes like "idle process" } boolean matched; try { matched = p.hasMatchingEnvVars(modelEnvVars); } catch (NativeAccessException e) { // likely a missing privilege logger.debug( " Failed to check environment variable match", e); continue; } if (matched) { logger.debug("Killing process started by build " + p.getPid()); p.killRecursively(); } } } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) { if (p.getPid() < 10) { continue; // ignore system processes like "idle process" } boolean matched; try { matched = p.hasMatchingEnvVars(modelEnvVars); } catch (NativeAccessException e) { // likely a missing privilege logger.debug(" Failed to check environment variable match", e); continue; } if (matched) { logger.debug("Killing process started by build " + p.getPid()); p.killRecursively(); } } } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) if(p.hasMatchingEnvVars(modelEnvVars)) p.killRecursively(); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) if(p.hasMatchingEnvVars(modelEnvVars)) p.killRecursively(); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) if(p.hasMatchingEnvVars(modelEnvVars)) p.killRecursively(); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) if(p.hasMatchingEnvVars(modelEnvVars)) p.killRecursively(); } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) { if (p.hasMatchingEnvVars(modelEnvVars)) { p.killRecursively(); } } } }
public void killAll(Map<String, String> modelEnvVars) throws InterruptedException { for (OSProcess p : this) if(p.hasMatchingEnvVars(modelEnvVars)) p.killRecursively(); } }