summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-08-06 23:56:46 +0200
committerhv <hv@crypt.org>2002-08-29 11:44:00 +0000
commit4d76a3443f3312704ec3416fd425698e92a208cd (patch)
tree769fa92e2e9f3a46a171807a82b7d5fd7c623c0a /util.c
parent85cf7f2e6c0eee352cdc28bfa7e316574993c2ba (diff)
downloadperl-4d76a3443f3312704ec3416fd425698e92a208cd.tar.gz
posixify getppid on linux-multithread
Message-Id: <20020806215646.3f6852bb.rgarciasuarez@free.fr> p4raw-id: //depot/perl@17798
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util.c b/util.c
index f275fcac00..35fb8a8c4d 100644
--- a/util.c
+++ b/util.c
@@ -2155,10 +2155,13 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
#endif /* defined OS2 */
/*SUPPRESS 560*/
if ((tmpgv = gv_fetchpv("$",TRUE, SVt_PV))) {
- SvREADONLY_off(GvSV(tmpgv));
+ SvREADONLY_off(GvSV(tmpgv));
sv_setiv(GvSV(tmpgv), PerlProc_getpid());
- SvREADONLY_on(GvSV(tmpgv));
- }
+ SvREADONLY_on(GvSV(tmpgv));
+ }
+#ifdef THREADS_HAVE_PIDS
+ PL_ppid = (IV)getppid();
+#endif
PL_forkprocess = 0;
hv_clear(PL_pidstatus); /* we have no children */
return Nullfp;