diff options
author | Eric Wong <e@80x24.org> | 2021-08-06 00:29:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-06 01:01:46 +0000 |
commit | 5d3e9705c8d5a6d0341a5f1bed2027ef9f9e95a8 (patch) | |
tree | 0fc05abdc29e33ed8634efb14d2bdca070d294be | |
parent | a29946ad3bc49704a512ae3ab31a45bbd66165e2 (diff) | |
download | public-inbox-5d3e9705c8d5a6d0341a5f1bed2027ef9f9e95a8.tar.gz |
li2wrap: avoid double-close on Linux::Inotify2 <2.3
LI2Wrap was not working as expected due to the missing bless to override ->DESTROY. This bug showed up in an message check in t/lei-q-remote-import.t Fixes: 7fc6e30aeab9925b ("lei: close inotify FD in forked child")
-rw-r--r-- | lib/PublicInbox/LI2Wrap.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/LI2Wrap.pm b/lib/PublicInbox/LI2Wrap.pm index 61cf4bee..204850a6 100644 --- a/lib/PublicInbox/LI2Wrap.pm +++ b/lib/PublicInbox/LI2Wrap.pm @@ -12,6 +12,7 @@ sub wrapclose { my ($inot) = @_; my $fd = $inot->fileno; open my $fh, '<&=', $fd or die "open <&= $fd $!"; + bless $inot, __PACKAGE__; } sub DESTROY {} # no-op |