mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:12:32 +08:00
[Hosts] Reset Terminate event after closing
This commit is contained in:
parent
72a481b17c
commit
8ee99dc127
@ -216,6 +216,12 @@ public:
|
|||||||
m_hShowAdminEvent = nullptr;
|
m_hShowAdminEvent = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_hTerminateEvent)
|
||||||
|
{
|
||||||
|
CloseHandle(m_hTerminateEvent);
|
||||||
|
m_hTerminateEvent = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,6 +286,7 @@ public:
|
|||||||
SetEvent(m_hTerminateEvent);
|
SetEvent(m_hTerminateEvent);
|
||||||
WaitForSingleObject(m_hProcess, 1500);
|
WaitForSingleObject(m_hProcess, 1500);
|
||||||
TerminateProcess(m_hProcess, 1);
|
TerminateProcess(m_hProcess, 1);
|
||||||
|
ResetEvent(m_hTerminateEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_enabled = false;
|
m_enabled = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user