summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-09-20 22:14:23 +0100
committerDavid Mitchell <davem@iabyn.com>2010-09-20 22:14:23 +0100
commit68b590d93559da1f7a0d3956202180d507013365 (patch)
tree9dc4837a540d2ecf0644565a2a73ad2cb9e0d584 /perl.c
parente4487e9b537f1be1e95aba1c87790c2a411788a7 (diff)
downloadperl-68b590d93559da1f7a0d3956202180d507013365.tar.gz
call defout/stderr destructors last
When calling the destructors for IO objects embedded in arena GVs, process PL_defoutgv and PL_stderrgv last. Yes, the test suite expects STDOUT to still work at this point. Indeed, one test in ref.t calls print from STDOUT's destructor (which is why pp_print needed a slight tweak to handle a null GV properly).
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/perl.c b/perl.c
index 509295893d..cf42087be2 100644
--- a/perl.c
+++ b/perl.c
@@ -774,8 +774,6 @@ perl_destruct(pTHXx)
*/
sv_clean_objs();
PL_sv_objcount = 0;
- if (PL_defoutgv && !SvREFCNT(PL_defoutgv))
- PL_defoutgv = NULL; /* may have been freed */
}
/* unhook hooks which will soon be, or use, destroyed data */
@@ -837,9 +835,6 @@ perl_destruct(pTHXx)
return STATUS_EXIT;
}
- /* reset so print() ends up where we expect */
- setdefout(NULL);
-
#ifdef USE_ITHREADS
/* the syntax tree is shared between clones
* so op_free(PL_main_root) only ReREFCNT_dec's