timeoutValue = Long.parseLong(timeout);
} catch (NumberFormatException e) {
// OK to use 0
}
}
ExternalCommand externalCmd =
ExternalCommand.executeWithTimeout(new File(workingDir), cmdValue, timeoutValue, args);
int exitValue = externalCmd.exitValue();
// debug
// System.out.println("command: " + cmd + ", exitValue: " + exitValue
// + " output:\n" + externalCmd.getStringOutput());
if (_logger.isDebugEnabled()) {
_logger.debug("command: " + cmd + ", exitValue: " + exitValue + " output:\n"
+ externalCmd.getStringOutput());
}
// monitor pid if pidFile exists
if (pidFile == null) {
// no pid to monitor