develooper Front page | perl.perl5.porters | Postings from August 2016

Re: [perl #128774] Signal handlers aren't honoured at END time

Thread Previous
Sawyer X
August 1, 2016 13:56
Re: [perl #128774] Signal handlers aren't honoured at END time
Message ID:

On 07/30/2016 04:47 PM, Leon Timmermans wrote:
> On Sat, Jul 30, 2016 at 6:47 AM, Zefram <
> <>> wrote:
>     The change is to unhook at the C level all Perl signal handlers before
>     interpreter destruction.  There's a valid rationale for that, but it's
>     happening too early.  It shouldn't happen before END blocks, in which
>     everything in the interpreter is still operable and the Perl
>     language is
>     still expected to be well behaved. 
> Agreed.
>     It could happen just before global
>     destruction, or just after.
> I would argue before. Global destruction is unpredictable enough as it
> is, adding signals to that will only make it worse. I think that in
> the non-object phase it might even segfault because the CV doesn't
> exist anymore. One could argue to unhook it right after global object
> destruction (so well before global non-object destruction) though.

I appreciate Paul's comment on this: "[...]  as already GD is a weird
time.". :)

What would worry me is that if it's after GD, people might depend on it
and now refactoring this, cleaning it up, optimizing it - those actions
might conflict. I would rather keep it before unless there's a good[1]

[1] "I want" should probably not be a good enough reason.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About