Various tweaks to Encode
[p5sagit/p5-mst-13.2.git] / 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;;