1 # Copyright (C) all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # Wrapper for Linux::Inotify2 < 2.3 which lacked ->fh and auto-close
5 # Remove this when supported LTS/enterprise distros are all
6 # Linux::Inotify2 >= 2.3
7 package PublicInbox::LI2Wrap;
9 our @ISA = qw(Linux::Inotify2);
13 my $fd = $inot->fileno;
14 open my $fh, '<&=', $fd or die "open <&= $fd $!";
15 bless $inot, __PACKAGE__;
18 sub DESTROY {} # no-op