Pratik wrote:
I know that this has been problem with all the applications that
embedd perl in it. The patch is available for mp2. Any pointers on how
to solve this for mp1 ?
Try this patch. It's untested (I just tested that it compiles):
Index: src/modules/perl/perl_util.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v
retrieving revision 1.53
diff -u -r1.53 perl_util.c
--- src/modules/perl/perl_util.c 30 Oct 2003 19:39:17 -0000 1.53
+++ src/modules/perl/perl_util.c 20 Aug 2004 05:38:10 -0000
@@ -665,6 +665,15 @@
tie_env;
}
+/* starting from 5.8.1 perl caches ppids, so we need to maintain our
+ * own. some distros fetch fake 5.8.0 with changes from 5.8.1, so we
+ * need to do that for those fake 5.8.0 as well. real 5.8.0 doesn't
+ * have THREADS_HAVE_PIDS defined.
+ */
+#if PERL_REVISION == 5 && PERL_VERSION >= 8 && THREADS_HAVE_PIDS
+#define MP_MAINTAIN_PPID
+#endif
+
void mod_perl_init_ids(void) /* $$, $>, $), etc */
{
if(set_ids++) return;
@@ -676,8 +685,15 @@
egid = (int)getegid();
MP_TRACE_g(fprintf(stderr,
"perl_init_ids: uid=%d, euid=%d, gid=%d, egid=%d\n",
- uid, euid, gid, egid));
+ uid, euid, gid, egid));
+#endif
+
+#ifdef MP_MAINTAIN_PPID
+ ppid = (I32)getppid();
+ MP_TRACE_g(fprintf(stderr,
+ "perl_init_ids: ppid=%d\n", ppid));
#endif
+
}
int perl_eval_ok(server_rec *s)
Index: src/modules/perl/perl_PL.h
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_PL.h,v
retrieving revision 1.8
diff -u -r1.8 perl_PL.h
--- src/modules/perl/perl_PL.h 6 Jul 2001 16:09:53 -0000 1.8
+++ src/modules/perl/perl_PL.h 20 Aug 2004 05:38:10 -0000
@@ -43,6 +43,9 @@
#ifndef envgv
#define envgv PL_envgv
#endif
+#ifndef ppid
+#define ppid PL_ppid
+#endif
#ifndef euid
#define euid PL_euid
#endif
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html