> Hi,
>
> We at $work are using uWSGI with Perl. We would like to trigger
> certain cleanup actions when a worker is terminated.
>
> My first thought was to intercept $SIG{TERM}/$SIG{INT}/$SIG{QUIT} as
> necessary, however experiments to make this work suggest that uWSGI
> intercepts these signals, and does not allow the worker process to
> handle them itself.
>
> How can we ensure that cleanup processes are correctly run at termination?
>
> Is it possible to register a pre-teardown handler somehow?
>
> I have experience hacking perl internals, I would be open to
> investigating improvements in this area given some guidance.
>
> Yves
> ps: Please forgive any lack of RTFM, I am new to uWSGI and still
> getting up to speed.
>
> --
> perl -Mre=debug -e "/just|another|perl|hacker/"
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

You can try with the AtExit module

http://search.cpan.org/~bradapp/AtExit-2.01/AtExit.pm

now i am not able to test it, but eventually fixing the psgi plugin for it
should be pretty easy.



-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to