diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-08-06 23:56:46 +0200 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-29 11:44:00 +0000 |
commit | 4d76a3443f3312704ec3416fd425698e92a208cd (patch) | |
tree | 769fa92e2e9f3a46a171807a82b7d5fd7c623c0a /util.c | |
parent | 85cf7f2e6c0eee352cdc28bfa7e316574993c2ba (diff) | |
download | perl-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |