about summary refs log tree commit homepage
path: root/lib/PublicInbox/DS.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-11 09:41:31 +0000
committerEric Wong <e@80x24.org>2023-09-11 18:51:17 +0000
commit54929c5ed9c91eb23660a9822829d2a3170ef0e9 (patch)
tree2faf0a273a42fcf838ee496865fc398b5712ef52 /lib/PublicInbox/DS.pm
parent831ac641e8c23e3c87931b902527d7f5600fd80a (diff)
downloadpublic-inbox-54929c5ed9c91eb23660a9822829d2a3170ef0e9.tar.gz
There's no need for for a complicated map {} block here.  All
these unblockable signals are POSIX since 2001 at the latest, so
there's no reason any platform would lack them.
Diffstat (limited to 'lib/PublicInbox/DS.pm')
-rw-r--r--lib/PublicInbox/DS.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm
index f2b14799..b3edc094 100644
--- a/lib/PublicInbox/DS.pm
+++ b/lib/PublicInbox/DS.pm
@@ -186,11 +186,9 @@ sub RunTimers {
 
 sub sig_setmask { sigprocmask(SIG_SETMASK, @_) or die "sigprocmask: $!" }
 
-our @UNBLOCKABLE = map { # ensure we detect bugs, HW problems and user rlimits
-        my $cb = POSIX->can("SIG$_");
-        my $num = $cb ? $cb->() : undef;
-        $num ? ($num) : ();
-} qw(ABRT BUS FPE ILL SEGV XCPU XFSZ);
+# ensure we detect bugs, HW problems and user rlimits
+our @UNBLOCKABLE = (POSIX::SIGABRT, POSIX::SIGBUS, POSIX::SIGFPE,
+        POSIX::SIGILL, POSIX::SIGSEGV, POSIX::SIGXCPU, POSIX::SIGXFSZ);
 
 sub block_signals { # anything in @_ stays unblocked
         my $newset = POSIX::SigSet->new;