Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EnsureWatchingForExit()

void System.Diagnostics.Process.EnsureWatchingForExit ( )
inlineprivate

Definition at line 1610 of file Process.cs.

1611 {
1612 if (_watchingForExit)
1613 {
1614 return;
1615 }
1616 lock (this)
1617 {
1618 if (!_watchingForExit)
1619 {
1620 _watchingForExit = true;
1621 try
1622 {
1623 _waitHandle = new global::Interop.Kernel32.ProcessWaitHandle(GetOrOpenProcessHandle());
1625 return;
1626 }
1627 catch
1628 {
1629 _watchingForExit = false;
1630 throw;
1631 }
1632 }
1633 }
1634 }
SafeProcessHandle GetOrOpenProcessHandle()
Definition Process.cs:1165
RegisteredWaitHandle _registeredWaitHandle
Definition Process.cs:148
void CompletionCallback(object waitHandleContext, bool wasSignaled)
Definition Process.cs:910
static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce, bool flowExecutionContext)

References System.Diagnostics.Process._registeredWaitHandle, System.Diagnostics.Process._waitHandle, System.Diagnostics.Process._watchingForExit, System.Diagnostics.Process.CompletionCallback(), System.Runtime.Serialization.Dictionary, System.Diagnostics.Process.GetOrOpenProcessHandle(), and System.Threading.ThreadPool.RegisterWaitForSingleObject().

Referenced by System.Diagnostics.Process.SetProcessHandle().