* Fixes #2534 by replacing expensive WMI query with Win32 API calls * fix break on unix build * added tests for #2535 * although test passed, fixing exception that shows up * fixed Describe text * addressing code review feedback * addressing review feedback to comment on why sleep is needed added check that test processes are created before we try to kill them * fixed test to timeout and pending fix for #2561
25 lines
689 B
C#
25 lines
689 B
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Threading;
|
|
|
|
namespace CreateChildProcess
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
if (args.Length > 0)
|
|
{
|
|
uint num = UInt32.Parse(args[0]);
|
|
for (uint i = 0; i < num; i++)
|
|
{
|
|
Process child = new Process();
|
|
child.StartInfo.FileName = Process.GetCurrentProcess().MainModule.FileName;
|
|
child.Start();
|
|
}
|
|
}
|
|
// sleep is needed so the process doesn't exit before the test case kill it
|
|
Thread.Sleep(100000);
|
|
}
|
|
}
|
|
}
|