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:
>
> my entries in httpd.conf:
>
> PerlModule Apache::Resource
> PerlSetEnv PERL_RLIMIT_CPU 120:150
> PerlSetEnv PERL_RLIMIT_AS 30000000:35000000
> PerlChildInitHandler Apache::Resource
>
> and this is how i tried to catch the signals:
>
> sub cleanup { die "cleanup called..."; }
> $SIG{XFSZ} = \&cleanup;
>
> i use linux, thus i have to use RLIMIT_AS and so maybe XFSZ is the wrong
> signal for the RAM limit. which do i have to use then?
>
> but i tried $SIG{XCPU} but it doesnt work as well.
>
> it just killed the task at soft limit without calling "cleanup". what is
> wrong?
>
> 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 ?
>
> thanx in advance!
>
> best regards,
>
> christoph bergmann
>
Does the following help? (Look at the register_cleanup method)
http://thingy.kcilink.com/modperlguide/debug/Safe_Resource_Locking_and_Cleanu.html
--
_____________________________________________________________________
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/