about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-03-26 10:52:46 +0000
committerEric Wong <e@80x24.org>2023-03-26 11:45:58 +0000
commit78cf2586c2e9d7f8e7a77c24ccca3d054ab9d0a6 (patch)
tree976f7695d6b474ba220ac4ddaef8b4abb11a6ef4 /script
parentab2ee025d73f91761265d544c0a11f2b9e20c342 (diff)
downloadpublic-inbox-78cf2586c2e9d7f8e7a77c24ccca3d054ab9d0a6.tar.gz
The normal method by which PublicInbox::DS::event_loop sets up
signals once needs some coercing to work with -watch.
Otherwise, we'll end up wasting FDs every time somebody reloads
-watch via SIGHUP.
Diffstat (limited to 'script')
-rwxr-xr-xscript/public-inbox-watch1
1 files changed, 1 insertions, 0 deletions
diff --git a/script/public-inbox-watch b/script/public-inbox-watch
index 4c50461f..2fb27343 100755
--- a/script/public-inbox-watch
+++ b/script/public-inbox-watch
@@ -27,6 +27,7 @@ my $reload = sub {
         $watch->quit;
         $watch = PublicInbox::Watch->new(PublicInbox::Config->new);
         if ($watch) {
+                $watch->{sig} = $prev->{sig}; # prevent redundant signalfd
                 warn "# reloaded\n";
         } else {
                 warn("E: reloading failed\n");