You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James Andrews <ja...@jamesandrews.eu> on 2012/02/11 15:18:23 UTC

ModPerl::Util::exit: (120000) exit was called

Afternoon mod_perl'ers,

I am a Perl programmer of 7 years, however this is the first time I have 
come to using mod_perl. In a nutshell I am getting this error:

ModPerl::Util::exit: (120000) exit was called at /path/to/script.cgi

I have a clean install of Ubuntu 10.04, apache2, libapache2-mod-perl2 and the following in apache2.conf:

<Files ~ "\.(pl|cgi)$">
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            Options +ExecCGI
            PerlSendHeader On
</Files>

In my scripts I call exit(); everywhere. However according to the mod_perl website, this shouldn't be a problem (correct me if I am wrong).

I have done the same setup on 3 different servers using the same OS and yield the same error each time!

If anyone has any ideas please let me know. I have searched the internet everywhere for solution, however this problem doesn't seem to be of large.

Kind regards,

James Andrews



Re: ModPerl::Util::exit: (120000) exit was called

Posted by gAzZaLi <ba...@bac2bac.com>.
*** Disclosure: Haven't encountered this issue but was lacking a Sunday 
morning puzzle so take this for what it's worth.


You're right about the exit() documentation.

I tried to recreate your problem and could only come up with a similar 
situation if I used exit() inside an eval block like so:

eval{
   if ( $failing_condition ) {
      exit();
   }
};

if ( $@ ) {
     carp($@);
}


That gives a similar error message to yours in the error log. That's 
because exit() here is inside the eval block and it is trapped and won't 
be carried out. Code after the exit() is still executed.

In the above code, you can fix it by adding another exit() like so:

if ( $@ ) {
   carp($@);
   exit(); # Works as it's outside an eval block
}

This'll work as expected. A more in depth explanation and better code to 
check errors is here:

http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_exit_


g.

On 2/11/2012 6:18 AM, James Andrews wrote:
> Afternoon mod_perl'ers,
>
> I am a Perl programmer of 7 years, however this is the first time I have
> come to using mod_perl. In a nutshell I am getting this error:
>
> ModPerl::Util::exit: (120000) exit was called at /path/to/script.cgi
>
> I have a clean install of Ubuntu 10.04, apache2, libapache2-mod-perl2
> and the following in apache2.conf:
>
> <Files ~ "\.(pl|cgi)$">
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> Options +ExecCGI
> PerlSendHeader On
> </Files>
>
> In my scripts I call exit(); everywhere. However according to the
> mod_perl website, this shouldn't be a problem (correct me if I am wrong).
>
> I have done the same setup on 3 different servers using the same OS and
> yield the same error each time!
>
> If anyone has any ideas please let me know. I have searched the internet
> everywhere for solution, however this problem doesn't seem to be of large.
>
> Kind regards,
>
> James Andrews
>
>
>
>