* interrupted for some reason. So make sure the command process exit
* was actually detected before trying to interpret the status.
*/
if ( ! processExitDetected.get()) {
logger.fine("Command process monitoring thread stopped before the command process, so the command's state is unknown");
throw new RegistrationException(StringManager.getString("xfmgr.unknownCmdProcResult"));
}
/*
* By checking processExited first, we know that at this point the
* processExitStatus has meaning. So go ahead and check it to
* decide if the process completed successfully or not.
*/
if (processExitStatus.get() != 0) {
/*
* Build an exception using the error output from the process
* and throw it.
*/
RegistrationException e =
new RegistrationException(StringManager.getString("xfmgr.cmdProcFailed", errorTextFromProcess.toString()));
throw e;
}
logger.fine("Command process seems to have completed successfully");
}