throw new ProcessManagerException(asadmin.getAbsolutePath() + " is not executable.");
lastCommandRun = commandListToString(fullcommand);
trace("Running command locally: " + lastCommandRun);
ProcessManager pm = new ProcessManager(fullcommand);
pm.setStdinLines(stdinLines);
// XXX should not need this after fix for 12777, but we seem to
pm.waitForReaderThreads(waitForReaderThreads);
pm.execute(); // blocks until command is complete
String stdout = pm.getStdout();
String stderr = pm.getStderr();
if (output != null) {
if (StringUtils.ok(stdout)) {
output.append(stdout);
}
if (StringUtils.ok(stderr)) {
if (output.length() > 0) {
output.append(NL);
}
output.append(stderr);
}
}
return pm.getExitValue();
}