AcManager.Tools.Helpers.ChildProcessTracker.AddProcess C# (CSharp) Method

AddProcess() public static method

Add the process to be tracked. If our current process is killed, the child processes that we are tracking will be automatically killed, too. If the child process terminates first, that's fine, too.
public static AddProcess ( Process process ) : void
process System.Diagnostics.Process
return void
        public static void AddProcess(Process process) {
            if (_jobHandle == IntPtr.Zero) return;
            if (!AssignProcessToJobObject(_jobHandle, process.Handle)) {
                throw new Win32Exception();
            }
        }