the perl process becomes 1, refresh the ppid cache (this may
indicate that the parent process has died.)
p4raw-id: //depot/perl@24367
#ifdef HAS_GETPPID
dSP; dTARGET;
# ifdef THREADS_HAVE_PIDS
+ {
+ IV cur_ppid = getppid();
+ if (cur_ppid == 1)
+ /* maybe the parent process has died. Refresh ppid cache */
+ PL_ppid = cur_ppid;
+ }
XPUSHi( PL_ppid );
# else
XPUSHi( getppid() );