I guess I don't understand why this doesn't print or sleep either:
___EXP_FUNC(void,___cleanup) ___PVOID { /* * Only do cleanup once after successful setup. */
printf ("setup_state : %i \n" , setup_state); fflush (stdout); sleep(30);
if (setup_state != 1) return;
setup_state = 2;
___cleanup_mem (); ___cleanup_os (); }