* @exception Exception
*/
public static void execCmdDumpResults(String[] args, Vector vCmd,
BufferedOutputStream bos) throws Exception {
// We need the process inputstream and errorstream
ProcessStreamResult prout = null;
ProcessStreamResult prerr = null;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < args.length; i++) {
sb.append(args[i] + " ");
}
System.out.println(sb.toString());
int totalSize = vCmd.size() + args.length;
String serverCmd[] = new String[totalSize];
int i = 0;
for (i = 0; i < vCmd.size(); i++)
serverCmd[i] = (String) vCmd.elementAt(i);
for (int j = 0; i < totalSize; i++)
serverCmd[i] = args[j++];
System.out.flush();
bos.flush();
// Start a process to run the command
Process pr = Runtime.getRuntime().exec(serverCmd);
// TimedProcess, kill process if process doesnt finish in a certain
// amount of time
TimedProcess tp = new TimedProcess(pr);
prout = new ProcessStreamResult(pr.getInputStream(), bos,
timeoutMinutes);
prerr = new ProcessStreamResult(pr.getErrorStream(), bos,
timeoutMinutes);
// wait until all the results have been processed
boolean outTimedOut = prout.Wait();
boolean errTimedOut = prerr.Wait();
// wait for this process to terminate, upto a wait period
// of 'timeoutSecondsForProcess'
// if process has already been terminated, this call will
// return immediately.