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 /pp_sys.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 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3960,6 +3960,9 @@ PP(pp_fork) sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid()); SvREADONLY_on(GvSV(tmpgv)); } +#ifdef THREADS_HAVE_PIDS + PL_ppid = (IV)getppid(); +#endif hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */ } PUSHi(childpid); @@ -4239,7 +4242,11 @@ PP(pp_getppid) { #ifdef HAS_GETPPID dSP; dTARGET; +# ifdef THREADS_HAVE_PIDS + XPUSHi( PL_ppid ); +# else XPUSHi( getppid() ); +# endif RETURN; #else DIE(aTHX_ PL_no_func, "getppid"); |