Exemple #1
0
        static void Main(string[] args)
        {
            var process = Process.Start("notepad.exe");

            process.WaitForInputIdle();

            using (var job = JobObject.CreateAsKillOnJobClose())
            {
                job.AssignProcess(process);
            } // notepad.exe killed
        }