using System.Diagnostics;
internal static class Program
{
static async Task Main(string[] args)
{
Console.WriteLine("Started");
ProcessStartInfo info = new ProcessStartInfo { FileName = "echo", Arguments = "hi" };
Console.ReadLine();
for (int i = 0; i < 300; i++)
{
Process proc = new Process { StartInfo = info };
proc.Start();
proc.WaitForExit();
proc.Dispose();
}
await Task.Delay(int.MaxValue);
}
}
using System.Diagnostics;
internal static class Program
{
static async Task Main(string[] args)
{
Console.WriteLine("Started");
ProcessStartInfo info = new ProcessStartInfo { FileName = "echo", Arguments = "hi" };
Console.ReadLine();
for (int i = 0; i < 300; i++)
{
Process proc = new Process { StartInfo = info };
proc.Start();
proc.WaitForExit();
proc.Dispose();
}
await Task.Delay(int.MaxValue);
}
}