https://bugs.winehq.org/show_bug.cgi?id=38627
--- Comment #11 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Dmitry Timoshkov from comment #9)
The applications expects that variable var_to_test is set by the thread proc after the event is signalled, but all the threads are already dead at the point of PROCESS_DETACH event, so the app hangs forever waiting for the variable.
So far I failed to reproduce this application's expectation with a test under Windows7, the thread gets killed before the PROCESS_DETACH event. My guess was that the event could get an abandoned state during thread termination by ExitProcess, so that WaitForSingleObejct() would return and allow setting the variable, but so far I couldn't confirm that theory.
A probable explanation could be that variable var_to_test might be set from some other place besides the thread_proc, and it's another bug revealed by the thread termination on process exit.