Home: Perl Programming Help: mod_perl:
ModPerl::Util::exit: (120000) exit was called

New User

Jan 27, 2012, 6:07 AM

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

I'm trying to run mod_perl on Ubuntu 10.04. According to here: http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_exit_ it is OK to use exit();

I have my own subroutine called sub Exit {} that is in a separate file. The subroutine does some clearing up stuff with a database, and then at the end it terminates the program by calling exit();

However I am getting this error:

ModPerl::Util::exit: (120000) exit was called at /home/...

Even though apparently this is perfectly OK to use this.

What's going on? I have spent over 2 days now browsing the internet trying to fix this problem and I still can't find a solution.

Thank you


Apr 5, 2012, 2:01 PM

Views: 67026
Re: [jamesa00789] ModPerl::Util::exit: (120000) exit was called


I can't be certain but could be where you have called exit within an eval block. In this case, you could check if $@ matches the "ModPerl::Util::exit" error, then handle appropriately:

eval { Exit(); }; 
if ($@)
if ($@ =~ m/ModPerl::Util::exit/)
die "Another error occurred: $@\n";


(This post was edited by Zhris on Jun 15, 2012, 2:41 PM)