From 847bd6ea4385252528bad5a9079c97ab62dfa167 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Sep 2023 00:54:06 +0000 Subject: [PATCH] tail_notify: reinstate watch on reopen This fixes t/tail_notify.t on NetBSD 9.3 where the log file is deleted and later recreated. --- lib/PublicInbox/TailNotify.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/TailNotify.pm b/lib/PublicInbox/TailNotify.pm index cbbc1041d..f4ffb2964 100644 --- a/lib/PublicInbox/TailNotify.pm +++ b/lib/PublicInbox/TailNotify.pm @@ -29,6 +29,7 @@ sub reopen_file ($) { open my $fh, '<', $self->{fn} or return undef; my @st = stat $fh or die "fstat($self->{fn}): $!"; $self->{ino_dev} = "@st[0, 1]"; + $self->{inot}->watch($self->{fn}, $TAIL_MOD); $self->{watch_fh} = $fh; # return value } -- 2.47.3