summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-12-03 12:49:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-12-03 12:49:01 +0000
commitd90a703e9b2a2038e53e20447f0482fe07515888 (patch)
treef15c53e4f8097c5bd2fedd57b09b574d769e749a /perl.c
parent961ce445580b4e9c0fefe3823cbf9226fa16b9bc (diff)
downloadperl-d90a703e9b2a2038e53e20447f0482fe07515888.tar.gz
Fix up #18229.
p4raw-id: //depot/perl@18239
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl.c b/perl.c
index bc0c28b55d..2e3de84f16 100644
--- a/perl.c
+++ b/perl.c
@@ -155,6 +155,9 @@ perl_construct(pTHXx)
/* Init the real globals (and main thread)? */
if (!PL_linestr) {
+#ifdef USE_ITHREADS
+ MUTEX_INIT(&PL_dollarzero_mutex); /* for $0 modifying */
+#endif
#ifdef PERL_FLEXIBLE_EXCEPTIONS
PL_protect = MEMBER_TO_FPTR(Perl_default_protect); /* for exceptions */
#endif
@@ -918,10 +921,6 @@ 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