summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-10-21 17:15:54 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-10-21 17:15:54 +0000
commit3a1ee7e89ce6793a321c9c259b0464c3f464c5ce (patch)
tree3414bb97a6a0e5e2d8a198a39533cde8aa0f674a /perl.c
parenta1ea730d96bcc07b3d616a92ace3927de8290cdd (diff)
downloadperl-3a1ee7e89ce6793a321c9c259b0464c3f464c5ce.tar.gz
Convert rest of PerlIO's memory tables to per-interp and add clone functions
for them. Call explicit cleanup during destruct process. - one binmode test is failing - also ext/threads/t/basic.t fails under make test, and is noisy under harness. (Threads results are intermingled and don't match order expected.) p4raw-id: //depot/perlio@12547
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/perl.c b/perl.c
index 9eaa7b7b1f..3a11219227 100644
--- a/perl.c
+++ b/perl.c
@@ -258,7 +258,7 @@ perl_construct(pTHXx)
sys_intern_init();
#endif
- PerlIO_init(); /* Hook to IO system */
+ PerlIO_init(aTHX); /* Hook to IO system */
PL_fdpid = newAV(); /* for remembering popen pids by fd */
PL_modglobal = newHV(); /* pointers to per-interpreter module globals */
@@ -498,7 +498,7 @@ perl_destruct(pTHXx)
* flag is set in regexec.c:S_regtry
*/
SvFLAGS(resv) &= ~SVf_BREAK;
- }
+ }
else if(SvREPADTMP(resv)) {
SvREPADTMP_off(resv);
}
@@ -800,6 +800,11 @@ perl_destruct(pTHXx)
if (PL_sv_count != 0 && ckWARN_d(WARN_INTERNAL))
Perl_warner(aTHX_ WARN_INTERNAL,"Scalars leaked: %ld\n", (long)PL_sv_count);
+#if 1 && defined(PERLIO_LAYERS)
+ /* No more IO - including error messages ! */
+ PerlIO_cleanup(aTHX);
+#endif
+
Safefree(PL_origfilename);
Safefree(PL_reg_start_tmp);
if (PL_reg_curpm)
@@ -946,7 +951,7 @@ setuid perl scripts securely.\n");
{
/* we copy rather than point to argv
* since perl_clone will copy and perl_destruct
- * has no way of knowing if we've made a copy or
+ * has no way of knowing if we've made a copy or
* just point to argv
*/
int i = PL_origargc;
@@ -1517,7 +1522,7 @@ perl_run(pTHXx)
LEAVE;
FREETMPS;
PL_curstash = PL_defstash;
- if (!(PL_exit_flags & PERL_EXIT_DESTRUCT_END) &&
+ if (!(PL_exit_flags & PERL_EXIT_DESTRUCT_END) &&
PL_endav && !PL_minus_c)
call_list(oldscope, PL_endav);
#ifdef MYMALLOC