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

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

Thread Previous
From:
Sawyer X
Date:
August 1, 2016 13:56
Subject:
Re: [perl #128774] Signal handlers aren't honoured at END time
Message ID:
3545d6a3-d42e-1e62-1124-fb6cd1b48dad@gmail.com


On 07/30/2016 04:47 PM, Leon Timmermans wrote:
> On Sat, Jul 30, 2016 at 6:47 AM, Zefram <zefram@fysh.org
> <mailto:zefram@fysh.org>> 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]
reason.

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

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About