Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dispatch signals when leaving an eval
Currently PERL_ASYNC_CHECK is only called during scope exit in pp_leavetry and pp_levaeeval. This means that if the signal handler calls die, the eval won't catch it. This broke Sys::AlarmCall's test suite, which was doing the equivalent of $SIG{ALRM} = sub { die }; eval { alarm(1); select(undef, undef, undef, 10); } # expect the die to get caught and $@ set here. Because the select was the last statement in the block, PERL_ASYNC_CHECK wasn't called next until the leave_scope at the end of leavetry. See RT #88774. The simple fix is to add a PERL_ASYNC_CHECK at the top of leavetry and leaveeval.
- Loading branch information