#ifndef _CYGWIN_ ExitProcess (1); #else exit (1); #endif I'm puzzled by the above. Shouldn't we be giving MSVCRT the opportunity to run any shutdown it wishes to? Max.