summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-11-24 14:56:18 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-25 03:00:49 +0000
commit306196c33b5ac60c7c253de83663fec31448e22d (patch)
treee2804ca5d180cd2ef8ec64f5c39257adba9093d9 /pp_sys.c
parentd2fa5cc0d287cd15433ab9335a41b9d14c02edc5 (diff)
downloadperl-306196c33b5ac60c7c253de83663fec31448e22d.tar.gz
$$ readonly, take two
Message-ID: <20011124195618.A14614@blackrider> p4raw-id: //depot/perl@13252
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index bf2b3522e0..4b9b0963d7 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3923,8 +3923,11 @@ PP(pp_fork)
RETSETUNDEF;
if (!childpid) {
/*SUPPRESS 560*/
- if ((tmpgv = gv_fetchpv("$", TRUE, SVt_PV)))
+ if ((tmpgv = gv_fetchpv("$", TRUE, SVt_PV))) {
+ SvREADONLY_off(GvSV(tmpgv));
sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid());
+ SvREADONLY_on(GvSV(tmpgv));
+ }
hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */
}
PUSHi(childpid);