[prev in list] [next in list] [prev in thread] [next in thread]
List: rhq-commits
Subject: [rhq] modules/core
From: John Sanda <jsanda () fedoraproject ! org>
Date: 2013-05-31 2:06:43
Message-ID: 20130531020643.F3E1B60F2F () fedorahosted ! org
[Download RAW message or body]
modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java | 10 \
++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit a6341a855844845c523c09c343a74f31b542b97c
Author: John Sanda <jsanda@redhat.com>
Date: Thu May 30 22:05:52 2013 -0400
revert changes to ProcessExecutor.startProgram since they break api compatibility
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java \
b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java index \
eb64ecb..e74bcce 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/exec/ProcessExecutor.java
@@ -68,8 +68,8 @@ public class ProcessExecutor {
ProcessExecutorResults results = new ProcessExecutorResults();
try {
- startProgram(processToStart, results);
-
+ Integer exitCode = startProgram(processToStart);
+ results.setExitCode(exitCode);
} catch (Throwable t) {
results.setError(t);
}
@@ -89,7 +89,7 @@ public class ProcessExecutor {
* start the process but not wait or was to wait and the wait time \
expired before the process exited
* @throws Exception if any error occurs while trying to start the child process
*/
- protected void startProgram(final ProcessToStart process, ProcessExecutorResults \
results) throws Exception { + protected Integer startProgram(final ProcessToStart \
process) throws Exception { // prepare the process comand line and environment
String[] cmdline = getCommandLine(process);
File workingDir = getWorkingDirectory(process);
@@ -97,7 +97,6 @@ public class ProcessExecutor {
// execute the program
final Process childProcess = Runtime.getRuntime().exec(cmdline, environment, \
workingDir);
- results.setProcess(childProcess);
// redirect the program's streams
final RedirectThreads redirect = redirectAllStreams(process, childProcess);
@@ -139,8 +138,7 @@ public class ProcessExecutor {
}
}
- results.setExitCode(exitCode);
- ;
+ return exitCode;
}
/**
_______________________________________________
rhq-commits mailing list
rhq-commits@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic