[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: [mp2] apache2::reload causing segfault?
From:       Douglas Riordan <doug.riordan () gmail ! com>
Date:       2005-06-27 21:59:59
Message-ID: b5a3b0d705062714597e1c6904 () mail ! gmail ! com
[Download RAW message or body]

On 6/27/05, Vincent Moneymaker <vbmonymaker@hotmail.com> wrote:
> 
> Douglas Riordan wrote:
> 
> >On 6/27/05, Vincent Moneymaker <vbmonymaker@hotmail.com> wrote:
> > Douglas Riordan wrote:
> > >On 6/27/05, Philip M. Gollucci <pgollucci@p6m7g8.com> wrote:
> > > Douglas Riordan wrote:
> > >
> > > >from Apache2::Const's perldoc
> > > >use Apache2::Const qw(OK);
> > > >compiles imports the OK constant.
> > > >
> > > >use Apache2::Const -compile => qw(OK);
> > > >only compiles the OK constant in which case i would have to use
> > > >return Apache2::Const::OK
> > > >
> > > >
> > > I agree with the perldoc.
> > >
> > > Whats this coming from then ?
> > >
> > > Constant subroutine My::OK redefined at
> > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/ModPerl/Util.pm
> > > line 66.
> >
> > As you noted, I think the problem you are having is the same as the one I
> > was having.  I had to do two things to get the reload module to work and
> not
> > segfault.  First, I went back to the code in the old Reload.pm module.
> 
> >did you just grab 0.08?  if so, which revision?
> 
> > Second, and more importantly, I had to change all of the constants used in
> > return statements (e.g. 'return OK') to 'return Apache2::Const::OK' or
> > 'return REDIRECT' to 'return Apache2::Const::REDIRECT'.  Whereever any of
> > the Apache2 constants were used I had to change them from the bareword to
> > the 'Apache2::Const::OK' form in order to get the Reload.pm module to stop
> > segfaulting.
> 
> >gotcha.  thanks.  =)
> 
> here is a link that gives the changes that need to be made to the Reload.pm
> module.  Please note that in the link where I say '#uncomment' it should
> just read '#'.
> 
> http://forums.devside.net/viewtopic.php?p=3405

bookmarked already.  ;-)

> Also, make sure that you remove any statements like 'use Apache2::Const
> qw(OK);' from your code where the Apache constants are being used.
> 
> BTW, just so we are on the same page, my segfaults were only occurring after
> I would make a change to a module.  If I started up Apache and left
> everything alone, then it worked fine.  But if I made a change and the
> Reload.pm tried to do its work, that is when the segfault would occur.  Is
> that what is happening for you?

yessir, that is indeed the case.

doug riordan

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic