Skip to content

Commit dbc438e

Browse files
committed
Fix process hanging upon closing.
1 parent 2636557 commit dbc438e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

RemoteInput/Plugin/Plugin.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ std::unique_ptr<Hook> exit_process;
7777

7878
[[gnu::stdcall]] void __unload()
7979
{
80+
// Force leak and let the OS cleanup otherwise processes hang
81+
// when destructors are called because `std::thread` will cause a recursive dll lock
82+
// to be held upon unload. IE: A dll cannot unload itself.
83+
control_center.release();
84+
8085
#if defined(DEBUG)
8186
printf("DETACHED FROM: %d\n", getpid());
8287
#endif

0 commit comments

Comments
 (0)