Subject: | Crash during global destruction when cleaning up signals |
This one has been mentioned before but latest CPAN still has the issue, so I figured worth raising here:
(in cleanup) (in cleanup) at .../IO/Async/Loop/Epoll.pm line 415 during global destruction.
caused by calling `->orig` on undef, see attached patch.
Subject: | 2018-08-16-undefined-signal.patch |
diff --git a/lib/IO/Async/Loop/Epoll.pm b/lib/IO/Async/Loop/Epoll.pm
index 5f4fbb4..99eb0f8 100644
--- a/lib/IO/Async/Loop/Epoll.pm
+++ b/lib/IO/Async/Loop/Epoll.pm
@@ -412,7 +412,7 @@ sub unwatch_signal
# When we saved the original value, we might have got an undef. But %SIG
# doesn't like having undef assigned back in, so we need to translate
- $SIG{$signal} = $self->{signals}{$signal}->orig || 'DEFAULT';
+ $SIG{$signal} = ($self->{signals}{$signal} && $self->{signals}{$signal}->orig) || 'DEFAULT';
delete $self->{signals}{$signal};