Subj : winXP/2k: ExitProcess() & atexit with multiple threads? To : comp.programming.threads From : Mile Blenton Date : Wed Feb 16 2005 09:53 am Hello group, Recently I've come accross the following behavior when using ExitProcess() inside addional thread I create within my prg. In main thread I attach a function to be called on exit with atexit() and create an additional thread with CreateThread(). At some point inside created thread ExitProcess() is called. Under winXP (with and without SP1, did not test with SP2), user atexit function gets called within context of the running thread (in this case it's the additional thread from where ExitProcess() is called). Under win2000 this is not the case, user atexit function will not be called when created thread calls ExitProcess, it only get's called when main thread terminates or calls ExitProcess (or so it would seem from my test prg). Anyone noticed this and has any explanation of this behavior? Which beahvior is the right one? ....or is it just another win wysiwyg feature and should be accepted as such? :) Best regards, Mario .