brauch added a comment.
Hm, there is at least one race condition here: thread A does old = ::SetErrorMode(...), then if before it resets it thread B does the same, then the old mode might never be restored. We can put a mutex but of course there might be another piece of code which does the same. So *shrug* not sure what to do, I guess it's just bad API and that's why MS replaced it. Maybe on XP we should just set the flag once on startup? At least that's not racy. REVISION DETAIL https://phabricator.kde.org/D3392 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, #frameworks, brauch