From cc96a611ea18eeabb81408a6de51d1ce70819f93 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 21 Aug 2018 15:11:39 -0700 Subject: [PATCH 1/2] Fix failing tests (#1288) --- test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs b/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs index e0cb1cef5d..b97aaf46f5 100644 --- a/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs +++ b/test/IIS.FunctionalTests/Inprocess/StdOutRedirectionTests.cs @@ -81,6 +81,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalFact] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] public async Task EnableCoreHostTraceLogging_TwoLogFilesCreated() { @@ -108,6 +109,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalTheory] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] [InlineData("CheckLargeStdErrWrites")] [InlineData("CheckLargeStdOutWrites")] @@ -131,6 +133,7 @@ namespace IIS.FunctionalTests.Inprocess } [ConditionalTheory] + [RequiresIIS(IISCapability.PoolEnvironmentVariables)] [SkipIfDebug] [InlineData("CheckLargeStdErrWrites")] [InlineData("CheckLargeStdOutWrites")] From e23d9cb4ac39d9868edc5295da76d42fdfccd6b6 Mon Sep 17 00:00:00 2001 From: Justin Kotalik Date: Tue, 21 Aug 2018 15:45:42 -0700 Subject: [PATCH 2/2] Fix a few leaked handles (#1260) --- .../InProcessRequestHandler/inprocessapplication.cpp | 3 --- .../InProcessRequestHandler/inprocessapplication.h | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp index 43a4071cf5..56eb63577c 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp @@ -44,7 +44,6 @@ IN_PROCESS_APPLICATION::IN_PROCESS_APPLICATION( IN_PROCESS_APPLICATION::~IN_PROCESS_APPLICATION() { - m_hThread = NULL; s_Application = NULL; } @@ -190,8 +189,6 @@ IN_PROCESS_APPLICATION::ShutDownInternal() } } - CloseHandle(m_hThread); - m_hThread = NULL; s_Application = NULL; } diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h index 10149cf3f3..1d5cfec4c9 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h @@ -121,7 +121,7 @@ private: }; // Thread executing the .NET Core process - HANDLE m_hThread; + HandleWrapper m_hThread; // The request handler callback from managed code PFN_REQUEST_HANDLER m_RequestHandler; @@ -134,7 +134,7 @@ private: PFN_ASYNC_COMPLETION_HANDLER m_AsyncCompletionHandler; // The event that gets triggered when managed initialization is complete - HANDLE m_pInitalizeEvent; + HandleWrapper m_pInitalizeEvent; STRU m_struExeLocation;