Cosmos/source2/Debug/Cosmos.Debug.HostProcess/Program.cs
mterwoord_cp 04deecf867
2009-11-03 11:31:42 +00:00

30 lines
968 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.IO.Pipes;
using System.Threading;
using System.Diagnostics;
namespace Cosmos.Debug.HostProcess
{
public class Program
{
static int Main(string[] args)
{
Console.ReadLine();
var xStartInfo = new ProcessStartInfo();
xStartInfo.FileName = args[0];
xStartInfo.Arguments = String.Join(" ", args.Skip(1).ToArray());
xStartInfo.RedirectStandardError = true;
xStartInfo.RedirectStandardOutput = true;
xStartInfo.UseShellExecute = false;
var xProcess = Process.Start(xStartInfo);
xProcess.WaitForExit();
Console.WriteLine(xProcess.StandardError.ReadToEnd());
Console.WriteLine(xProcess.StandardOutput.ReadToEnd());
return xProcess.ExitCode;
}
}
}