/** * Calls the <code>firewall-cmd</code> command with the given arguments * * @throws IOException when I/O exception or non-zero exit value */ private static ProcessResult execFirewallCmd(String ... args) throws IOException { String[] command = new String[1 + args.length]; command[0] = FIREWALL_CMD_EXE; System.arraycopy(args, 0, command, 1, args.length); ProcessResult result; synchronized(firewallCmdLock) { result = ProcessResult.exec(command); } if(result.getExitVal() != 0) throw new IOException(result.getStderr()); return result; }
ProcessResult result = ProcessResult.exec(command); int exitVal = result.getExitVal(); if(exitVal != 0) throw new IOException(diaExePath + ": non-zero exit value: " + exitVal);
ResourceSynchronizationResultStep step; try { ProcessResult processResult = ProcessResult.exec(command); step = new ResourceSynchronizationResultStep( startTime, ProcessResult processResult = ProcessResult.exec(command); int exitVal = processResult.getExitVal(); step = new ResourceSynchronizationResultStep(