private static void RunProcess(ProcessStartInfo psi, int threadIndex) { // Make sure required streams are redirected. psi.RedirectStandardOutput = true; psi.RedirectStandardError = true; var proc = Process.Start(psi); if (proc == null) { throw new IOException(string.Format("Failure starting {0} command.", psi.FileName)); // Not L10N } var reader = new ProcessStreamReader(proc); string line; while ((line = reader.ReadLine()) != null) { AddToLog(threadIndex, line); } proc.WaitForExit(); }
private static void RunProcess(ProcessStartInfo psi, int threadIndex) { // Make sure required streams are redirected. psi.RedirectStandardOutput = true; psi.RedirectStandardError = true; var proc = Process.Start(psi); if (proc == null) throw new IOException(string.Format("Failure starting {0} command.", psi.FileName)); // Not L10N var reader = new ProcessStreamReader(proc); string line; while ((line = reader.ReadLine()) != null) { AddToLog(threadIndex, line); } proc.WaitForExit(); }