Always flush the PerlIO buffers after running END blocks in
Artur Bergman [Thu, 18 Apr 2002 07:15:55 +0000 (07:15 +0000)]
perl_destruct. This should fix ext/threads/t/end.t under Win32.

p4raw-id: //depot/perl@15989

perl.c

diff --git a/perl.c b/perl.c
index c32cc0a..ef5b070 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -425,6 +425,9 @@ perl_destruct(pTHXx)
     LEAVE;
     FREETMPS;
 
+    /* Need to flush since END blocks can produce output */
+    PerlIO_flush((PerlIO*)NULL); 
+
     if (CALL_FPTR(PL_threadhook)(aTHX)) {
         /* Threads hook has vetoed further cleanup */
         return STATUS_NATIVE_EXPORT;;