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.