Christoph Bergmann wrote:

> Stas Bekman wrote:
> 
>>Christoph Bergmann wrote:
>>
>>
>>>hi...
>>>
>>>i use BSD::Resource to limit the ressources of the apache tasks. this
>>>works fine but now i want to clean up afterwards but i don't know how to
>>>catch a killed task... here is what i tried with signals:
>>>
>>>...
>>>
>>>
>>Does the following help? (Look at the register_cleanup method)
>>
>>http://thingy.kcilink.com/modperlguide/debug/Safe_Resource_Locking_and_Cleanu.html
>>
>>
> 
> thanks, this works. while playing around with it I found $SIG{__DIE__}
> in your mod_perl guide which fits even better to my needs (I have read
> about the problems as well but I think its ok for me) because the
> connection is still open and I can print out information about what has
> happened.
> 
> one more question: after processing the sub given to $SIG{__DIE__}
> apache prints out an "internal server error" - how can I avoid/suppress
> this?

I've no idea in what setup you are calling this. If it's a registry 
script you just exit. If it's a handler, you should return OK.

But you read 
http://perl.apache.org/guide/perl.html#Exception_Handling_for_mod_perl
aren't you?


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to