*/
private static void execCmdDumpResults (String[] args, int expectedExitCode, boolean printcmd)
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] + " ");
}
if (printcmd)
System.out.println(sb.toString());
else
System.out.println("org.apache.derby.drda.NetworkServerControl ping...");
int totalSize = vCmd.size() + args.length;
String serverCmd[] = new String[totalSize];
int i;
for (i = 0; i < vCmd.size(); i++)
{
serverCmd[i] = (String)vCmd.elementAt(i);
// System.out.println("serverCmd["+i+"]: "+serverCmd[i]);
}
int j = 0;
for (; i < totalSize; i++)
{
serverCmd[i] = args[j++];
// System.out.println("serverCmd["+i+"]: "+serverCmd[i]);
}
// Start a process to run the command
Process pr = Runtime.getRuntime().exec(serverCmd);
prout = new ProcessStreamResult(pr.getInputStream(), bos, timeoutMinutes);
prerr = new ProcessStreamResult(pr.getErrorStream(), bos, timeoutMinutes);
// wait until all the results have been processed
prout.Wait();
prerr.Wait();
// wait until the process exits
pr.waitFor();
// DERBY-214