On 14 January 2013 20:30, Roberto De Ioris <[email protected]> wrote:
>> As far as I can tell this solution will have the same problem. END{}
>> blocks are not executed due to a termination triggered by a signal.
>>
>> <quote>
>> It is important to note that END{} blocks and object destruction only
>> get called on normal termination (which includes calls to die or
>> Carp::croak). They do not get called when the program terminates
>> abnormally (due to a signal for example) unless special arrangements
>> have been made by the programmer (e.g. using a signal handler -- see
>> "%SIG{expr}" in perlvar).
>> </quote>
>>
>> Since uWSGI seems to not support passing such signals to the worker
>> process it seems to me that we are back to the same problem.
>
> I was sure AtExit would make use of the C atexit() function.

Yeah, I can imagine. I just checked again, and it is pure perl so I
dont think so.

> By the way this is not a big problem, the plugin api already has the
> ability to run hooks on shutdown/reload, it is a matter of 4-5 lines of C.
> I think i will be able to release a patch tomorrow.

That would be useful, thanks.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to