]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei: use scalar %SIG assignment
authorEric Wong <e@80x24.org>
Sun, 24 Sep 2023 21:08:21 +0000 (21:08 +0000)
committerEric Wong <e@80x24.org>
Sun, 24 Sep 2023 23:14:24 +0000 (23:14 +0000)
Perl v5.16.3 (and possibly some later versions) complain about
this, but newer (v5.32.1) are fine with it.

Fixes: e281363ba937 ("lei: ensure we run DESTROY|END at daemon exit w/ kqueue")
lib/PublicInbox/LEI.pm

index 1ead9bf6c6c0eec129fbcc0e08bbd12ab3aa2070..be77fa907849f510a8faad7f6b4758a4823aac5a 100644 (file)
@@ -1381,9 +1381,9 @@ sub lazy_start {
        PublicInbox::DS::sig_setmask($oldset) if @kq_ign;
 
        # exit() may trigger waitpid via various DESTROY, ensure interruptible
-       local @SIG{TERM} = sub { exit(POSIX::SIGTERM + 128) };
-       local @SIG{INT} = sub { exit(POSIX::SIGINT + 128) };
-       local @SIG{QUIT} = sub { exit(POSIX::SIGQUIT + 128) };
+       local $SIG{TERM} = sub { exit(POSIX::SIGTERM + 128) };
+       local $SIG{INT} = sub { exit(POSIX::SIGINT + 128) };
+       local $SIG{QUIT} = sub { exit(POSIX::SIGQUIT + 128) };
        PublicInbox::DS::sig_setmask($oldset) if !@kq_ign;
        dump_and_clear_log();
        exit($exit_code // 0);