thiago added a comment.
In https://phabricator.kde.org/D2545#69187, @kfunk wrote: > In https://phabricator.kde.org/D2545#69091, @thiago wrote: > > > There doesn't seem to be a way of doing some clean up before the threads are forcibly killed. > > > > Maybe if I abuse qtmain(). > > > This would only fix it for non-console GUI applications if I understand correctly. That's what we have here, but we'd still keep console applications buggy. There's no way to inject code before ExitProcess() with a plain console application. I was reading the ucrt source code yesterday and it does look like it processes atexit() registrations prior to ExitProcess(). So I'll go for that. There is a side-effect: I have to bring back the patch that makes QtDBus DLL non-unloadable, since otherwise it could crash during exit if had already been unloaded (was loaded by a plugin). BTW, do you know if this problem happens with MinGW? BRANCH master REVISION DETAIL https://phabricator.kde.org/D2545 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, vonreth, dfaure Cc: thiago, albertvaka, mutlaqja, arrowdodger, #frameworks