IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Tools.Runner.Internal.WindowsChildProcessTracker Class Reference

Allows processes to be automatically killed if this parent process unexpectedly quits. This feature requires Windows 8 or greater. On Windows 7, nothing is done. More...

Static Public Member Functions

static void AddProcess (Process process)
 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.
 

Detailed Description

Allows processes to be automatically killed if this parent process unexpectedly quits. This feature requires Windows 8 or greater. On Windows 7, nothing is done.

References: https://stackoverflow.com/a/4657392/386091 https://stackoverflow.com/a/9164742/386091

Definition at line 15 of file WindowsChildProcessTracker.cs.

Member Function Documentation

◆ AddProcess()

static void IKVM.Tools.Runner.Internal.WindowsChildProcessTracker.AddProcess ( Process process)
static

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.

Parameters
process

Definition at line 76 of file WindowsChildProcessTracker.cs.

77 {
78 if (s_jobHandle != IntPtr.Zero)
79 {
80 bool success = AssignProcessToJobObject(s_jobHandle, process.Handle);
81 if (!success && !process.HasExited)
82 throw new Win32Exception();
83 }
84 }

The documentation for this class was generated from the following file: