mod_perl error: (120000) exit was called at

Discussion in 'Perl Misc' started by Seansan, Mar 2, 2007.

  1. Seansan

    Seansan Guest

    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
     
    Seansan, Mar 2, 2007
    #1
    1. Advertising

  2. Seansan wrote:
    > 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.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 2, 2007
    #2
    1. Advertising

  3. Seansan

    Seansan Guest

    Gunnar Hjalmarsson wrote:
    > Seansan wrote:
    >> 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
     
    Seansan, Mar 2, 2007
    #3
  4. Seansan wrote:
    > Gunnar Hjalmarsson wrote:
    >> 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;
    >> }

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


    What makes you think that's not correct? ;-)

    Anyway, take a look at
    http://perl.apache.org/docs/1.0/gui...s__the_exit___and_child_terminate___functions

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 2, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FuZHk=?=

    Code to Exit Web App and Exit Internet Explorer

    =?Utf-8?B?U2FuZHk=?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,905
    =?Utf-8?B?U2FuZHk=?=
    Aug 5, 2005
  2. Joe Smith
    Replies:
    4
    Views:
    65,865
    sandeep1976
    Nov 8, 2006
  3. Replies:
    2
    Views:
    459
    Jeff Epler
    May 31, 2005
  4. QQ
    Replies:
    5
    Views:
    521
    Jonathan Adams
    May 10, 2005
  5. Replies:
    2
    Views:
    456
    Big and Blue
    Jan 25, 2006
Loading...

Share This Page