summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVance Morrison <vancemorrison@comcast.net>2018-07-16 09:40:31 -0700
committerVance Morrison <vancemorrison@comcast.net>2018-07-16 09:40:31 -0700
commitf4b36aa998ead4dddea6c29de6ac0a393fb138a8 (patch)
tree1941f13ea598644da2235ce2c9314c2693e1ca2c /src
parentce0a2617d40bc217b8e0a2137e340afe585afcb1 (diff)
downloadcoreclr-f4b36aa998ead4dddea6c29de6ac0a393fb138a8.tar.gz
coreclr-f4b36aa998ead4dddea6c29de6ac0a393fb138a8.tar.bz2
coreclr-f4b36aa998ead4dddea6c29de6ac0a393fb138a8.zip
Add back in code deleted in .NET Core port.
This fixes shutdown race bug that CoreCLR port reintroduced. Basically the fix needed some Appdomain APIs that were probably not in .NET Core 1.0 so they were removed. However they are back in .NET Core 2.0 so it is trivial to simply 'do the right thing', and put the shutdown logic back. See comment in front of DisposeOnShutdown for more.
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
index 162026754e..534e387d27 100644
--- a/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -4049,6 +4049,8 @@ namespace System.Diagnostics.Tracing
if (!s_EventSourceShutdownRegistered)
{
s_EventSourceShutdownRegistered = true;
+ AppDomain.CurrentDomain.ProcessExit += DisposeOnShutdown;
+ AppDomain.CurrentDomain.DomainUnload += DisposeOnShutdown;
}