Subject: | Warnings from IO::Async::Handle during global destruction |
I am doing something admittedly weird (using Parallel::ForkManager inside an IO::Async::Process), and getting a bunch of warnings during global destruction. I recognize that the likely answer is "don't do that," but nevertheless, the attached patch seems sufficient to fix it.
Subject: | uninit-warnings.patch |
From b68ff2dd24d86376e87c8958f518181ac8d32905 Mon Sep 17 00:00:00 2001
From: Michael McClimon <michael@mcclimon.org>
Date: Fri, 22 May 2020 14:46:48 -0400
Subject: [PATCH] fix
---
lib/IO/Async/Handle.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/IO/Async/Handle.pm b/lib/IO/Async/Handle.pm
index 673372b1..84c68a59 100644
--- a/lib/IO/Async/Handle.pm
+++ b/lib/IO/Async/Handle.pm
@@ -497,7 +497,7 @@ sub new_close_future
my $self = shift or return;
my $future = shift;
- @{ $self->{close_futures} } = grep { $_ != $future } @{ $self->{close_futures} };
+ @{ $self->{close_futures} } = grep { $_ && ($_ != $future) } @{ $self->{close_futures} };
})
);
--
2.25.0