Hi Torsten, I put this:
PerlModule Perl::AfterFork PerlInitHandler Perl::AfterFork::reinit In the config and tested it - I get this error message: [Sun Jun 12 22:36:46 2005] [error] Usage: Perl::AfterFork::reinit().\n [Sun Jun 12 22:36:50 2005] [error] Usage: Perl::AfterFork::reinit().\n ??? Cheers Adnreas -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 10. Juni 2005 09:19 An: [EMAIL PROTECTED]; modperl@perl.apache.org Betreff: AW: AW: Apache::SizeLimit ( mp1 and mp2 )-> I think there is a logical error in the code ... Hi Torsten, I did not find the time yet - but I will do. Cheers ANdreas -----Ursprüngliche Nachricht----- Von: Torsten Foertsch [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 10. Juni 2005 09:18 An: modperl@perl.apache.org Cc: Nolte, Andreas, D22-WHV Betreff: Re: AW: Apache::SizeLimit ( mp1 and mp2 )-> I think there is a logical error in the code ... I think that can be considered a bug in mp1. I remember I tried to show the behaviour with mp2 without success when the first message of the thread came in. A check on the source shows that mp2 has a ChildInit handler that resets PL_ppid if MP_MAINTAIN_PPID is defined. mp1 has obviously no such hook. Andreas, have you tried out to call Perl::AfterFork::reinit from a ChildInitHandler? It may be a cleaner solution if other modules also happen to use Perl's getppid. Torsten On Friday 10 June 2005 08:10, [EMAIL PROTECTED] wrote: > Hi y`all, > > Just as a follow-up: > > - replacing getppid with with syscall( &SYS_getppid ) and requiring > syscall.ph did the job ! - test system is Suse Linux Enterprise 9 SP1 > with mp 1 > > THX @ Torsten ! > > Cheers > > Andreas > > -----Ursprüngliche Nachricht----- > Von: Torsten Foertsch [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 24. Mai 2005 11:19 > An: modperl@perl.apache.org > Betreff: Re: Apache::SizeLimit ( mp1 and mp2 )-> I think there is a > logical error in the code ... > > On Tuesday 24 May 2005 09:39, [EMAIL PROTECTED] wrote: > > I claim, the "main process " detection does never work and does not > > make sense. Why? Not even when the apache is started on boot through > > init, the PPID will be 1, but some shell / rc pid. You can only > > find the PPID in the PID file that apache writes. But still: this > > should never be the case - right ? > > Normally Apache forks on startup to get rid of its parent. So the > init-process (1) inherits the orphan. Then Apache spawns its workers > that are direct children of the master Apache. Hence the test is in > principle right. > > [EMAIL PROTECTED]:~> ps -lC httpd > F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD > 5 S 0 7155 1 0 76 0 - 2756 - ? 00:00:00 httpd > 5 S 30 7158 7155 0 80 0 - 2774 322495 ? 00:00:00 httpd > 5 S 30 7159 7155 0 80 0 - 2774 semtim ? 00:00:00 httpd > > PID 7155 is the main apache. It's PPID is 1. > > But there is a problem with Perls getppid() implementation. Modern > Perls issue the syscall only once and cache the result. Maybe you > somehow hit that. Normally the cache is invalidated when Perl forks, > but Apache does its own fork. Thus maybe the cache remains. > > I'd try to replace getppid with syscall( &SYS_getppid ) and see if it > changes anything. > > Torsten