faster and 64 bit preserving arithmetic
[p5sagit/p5-mst-13.2.git] / win32 / perllib.c
index 1a9fa9f..87b79c0 100644 (file)
@@ -370,9 +370,12 @@ DllMain(HANDLE hModule,            /* DLL module handle */
         * process termination or call to FreeLibrary.
         */
     case DLL_PROCESS_DETACH:
-#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO)
-        PerlIO_cleanup();     
-#endif
+        /* As long as we use TerminateProcess()/TerminateThread() etc. for mimicing kill()
+           anything here had better be harmless if:
+            A. Not called at all.
+            B. Called after memory allocation for Heap has been forcibly removed by OS.
+            PerlIO_cleanup() was done here but fails (B).
+         */     
        EndSockets();
 #if defined(USE_THREADS) || defined(USE_ITHREADS)
        if (PL_curinterp)