mod_perl error: (120000) exit was called at

S

Seansan

Hi there,

I have just moved my server to an new hosting provider. Now I am seeing
a lot of error messages in the server log related to "([error]
ModPerl::Util::exit: (120000) exit was called at ...". I have pasted
the coded below that causes the error.

The error is caused at the line "exit 1;". I have always used this code
before, only now it causes an error. This code come from a PM module
that I call from my main .PL file/program.

How would I do this correctly so that ModPerl does not complain?

<code>
sub PRINT_ERROR($) {
my ($msg) = shift; $msg = 'Unknown error' if (!$msg);
my $tmp=&READ_FILE($error_tmp);
print $tmp;
exit 1; # <== ERROR HERE
}
</code>

Kind regards, Sean
 
G

Gunnar Hjalmarsson

Seansan said:
I have just moved my server to an new hosting provider. Now I am seeing
a lot of error messages in the server log related to "([error]
ModPerl::Util::exit: (120000) exit was called at ...". I have pasted
the coded below that causes the error.

The error is caused at the line "exit 1;". I have always used this code
before, only now it causes an error. This code come from a PM module
that I call from my main .PL file/program.

How would I do this correctly so that ModPerl does not complain?

<code>
sub PRINT_ERROR($) {
my ($msg) = shift; $msg = 'Unknown error' if (!$msg);
my $tmp=&READ_FILE($error_tmp);
print $tmp;
exit 1; # <== ERROR HERE
}
</code>

I'm using this function to prevent exit() issues in mod_perl:

sub myexit {
if ($ENV{MOD_PERL}) {
if ($] < 5.006) {
require Apache;
Apache::exit();
}
}
exit;
}

It may or may not address the issue you are experiencing.
 
S

Seansan

Gunnar said:
Seansan said:
I have just moved my server to an new hosting provider. Now I am
seeing a lot of error messages in the server log related to "([error]
ModPerl::Util::exit: (120000) exit was called at ...". I have pasted
the coded below that causes the error.

The error is caused at the line "exit 1;". I have always used this
code before, only now it causes an error. This code come from a PM
module that I call from my main .PL file/program.

How would I do this correctly so that ModPerl does not complain?

<code>
sub PRINT_ERROR($) {
my ($msg) = shift; $msg = 'Unknown error' if (!$msg);
my $tmp=&READ_FILE($error_tmp);
print $tmp;
exit 1; # <== ERROR HERE
}
</code>

I'm using this function to prevent exit() issues in mod_perl:

sub myexit {
if ($ENV{MOD_PERL}) {
if ($] < 5.006) {
require Apache;
Apache::exit();
}
}
exit;
}

It may or may not address the issue you are experiencing.


Thanks, I will try this. But I am also wondering what the correct way is
that mod_perl expects

regards, Seansan
 
G

Gunnar Hjalmarsson

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top