private DarwinProcess(NativeProcess process) { super(process.getPid()); this.process = process; }
try { for (final NativeProcess p : nativeUtils.getWindowsProcesses()) { int pid = p.getPid(); super.processes.put(pid,new OSProcess(pid) { private EnvVars env;
Darwin(NativeUtils nativeUtils) { this.nativeUtils = nativeUtils; try { for (final NativeProcess process : nativeUtils.getMacProcesses()) { try { super.processes.put(process.getPid(), new DarwinProcess(process)); } catch (NativeAccessException exc) { // We may have access permission, skip and get rest of the process logger.warn("Failed to fecth Native Mac Processes", exc.getLocalizedMessage()); } } } catch (NativeAccessException exc) { // Don't fail if the Native Mac access plugin is not installed. logger.warn( "Failed to fecth Native Mac Processes", exc.getLocalizedMessage()); } }