ProcUtils.runProcess(waitFor, cmd);
}
+ public int runInContainer(int reserved, int waitFor, int numOvs, String ... cmdWords)
+ throws IOException, InterruptedException {
+ String[] pfx = getExecCmdPrefix(numOvs);
+ String[] cmd = new String[pfx.length + cmdWords.length];
+ System.arraycopy(pfx, 0, cmd, 0, pfx.length);
+ System.arraycopy(cmdWords, 0, cmd, pfx.length, cmdWords.length);
+ return ProcUtils.runProcess(reserved, waitFor, null, cmd);
+ }
+
public void tryInContainer(String logText, int waitFor, int numOvs, String ... cmdWords) throws IOException, InterruptedException {
String[] pfx = getExecCmdPrefix(numOvs);
String[] cmd = new String[pfx.length + cmdWords.length];
Assert.assertEquals("ProcUtils.runProcess exit code is not 0", 0, exitValue);
}
+ public static int runProcess(int reserved, long waitFor, StringBuilder capturedStdout, String... words)
+ throws IOException, InterruptedException {
+ int exitValue = tryProcess(null, waitFor, capturedStdout, words);
+ LOG.info("ProcUtils.runProcess exit code: ", exitValue);
+ return exitValue;
+ }
+
/**
* Run a process.
* @param waitFor How long to wait for the command to execute