Fix race in SuperILC logger cleanup (dotnet/coreclr#27414)
authorJan Vorlicek <janvorli@microsoft.com>
Fri, 25 Oct 2019 16:11:10 +0000 (09:11 -0700)
committerGitHub <noreply@github.com>
Fri, 25 Oct 2019 16:11:10 +0000 (09:11 -0700)
commit1a994974139f6935b1e6900c6ca6e84c9c01f053
tree41696149c1acd485f92e9bb2fdc1739e894a4126
parent302b64549519f1a1f29887b5850eb840788490a2
Fix race in SuperILC logger cleanup (dotnet/coreclr#27414)

The StandardOutputEventHandler and StandardErrorEventHandler can race
with the CleanupLogWriter, resulting in an exception due to an attempt
to write to a disposed TextWriter.
This change fixes it.

Commit migrated from https://github.com/dotnet/coreclr/commit/8ef3510dc8de2c45afd48f8ba55b606d8e6d0c0a
src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs