summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-11-30 22:16:51 +0200
committerH.Merijn Brand <h.m.brand@xs4all.nl>2002-12-02 15:43:16 +0000
commite297595301ee5f3b0643be0fb1fffae9b6b548a0 (patch)
tree180f2d7e6d134e4213582d3b546ed42908da3da8 /perl.c
parent1a67fee7d910c67790fff4a69f2f20f7628aa80a (diff)
downloadperl-e297595301ee5f3b0643be0fb1fffae9b6b548a0.tar.gz
$0 mofifying part I
Subject: [PATCH] $0 modifying Message-ID: <20021130181651.GA5876@kosh.hut.fi> p4raw-id: //depot/perl@18229
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/perl.c b/perl.c
index 11da3153c5..bc0c28b55d 100644
--- a/perl.c
+++ b/perl.c
@@ -489,11 +489,6 @@ perl_destruct(pTHXx)
PL_e_script = Nullsv;
}
- while (--PL_origargc >= 0) {
- Safefree(PL_origargv[PL_origargc]);
- }
- Safefree(PL_origargv);
-
/* magical thingies */
SvREFCNT_dec(PL_ofs_sv); /* $, */
@@ -897,21 +892,7 @@ setuid perl scripts securely.\n");
#endif
PL_origargc = argc;
- {
- /* 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
- * just point to argv
- */
- int i = PL_origargc;
- New(0, PL_origargv, i+1, char*);
- PL_origargv[i] = '\0';
- while (i-- > 0) {
- PL_origargv[i] = savepv(argv[i]);
- }
- }
-
-
+ PL_origargv = argv;
if (PL_do_undump) {
@@ -937,6 +918,10 @@ setuid perl scripts securely.\n");
oldscope = PL_scopestack_ix;
PL_dowarn = G_WARN_OFF;
+#ifdef USE_ITHREADS
+ MUTEX_INIT(&PL_dollarzero_mutex);
+#endif
+
#ifdef PERL_FLEXIBLE_EXCEPTIONS
CALLPROTECT(aTHX_ pcur_env, &ret, MEMBER_TO_FPTR(S_vparse_body), env, xsinit);
#else