Skip to content

Commit ab52c70

Browse files
authored
Unregister signal handler (microsoft#5861)
## Change Remove the CTRL handler when we destruct.
1 parent 419875b commit ab52c70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/AppInstallerCLICore/ShutdownMonitoring.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ namespace AppInstaller::ShutdownMonitoring
101101

102102
TerminationSignalHandler::~TerminationSignalHandler()
103103
{
104+
SetConsoleCtrlHandler(StaticCtrlHandlerFunction, FALSE);
105+
104106
// std::thread requires that any managed thread (joinable) be joined or detached before destructing
105107
if (m_windowThread.joinable())
106108
{

0 commit comments

Comments
 (0)