> it just killed the task at soft limit without calling "cleanup". what is > wrong?
I believe the limiting done by BSD::Resource is pretty harsh and may actually be at the kernel level. I don't think you can catch the signal and deal with it yourself. What you should do is use Apache::SizeLimit to handle your size constraints, and just use BSD::Resource for extreme cases, i.e. out of control servers in tight loops. > or is there another possibility for cleaning up? probably there is a > handler i can use which will be called when a program is finished, if > so, how can i check if the program has ended as it shoulds or if it was > killed by BSD::resource ? Put your cleanup code in a PerlChildExitHandler. Apache::SizeLimit will allow this to be called, since it uses the $r->child_terminate() call. BSD::Resource just does a harsh kill. - Perrin