diff options
author | Eric Wong <e@80x24.org> | 2021-05-06 17:09:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-06 17:13:00 +0000 |
commit | 36fa9327fd83085d9384e3d1941d9ca678308149 (patch) | |
tree | 02ed249c0bc1f3c8c68d1700ad147758db10d01e /t | |
parent | 8b7fbce5c50b51610f3ea69412ea5b19d7d38537 (diff) | |
download | public-inbox-36fa9327fd83085d9384e3d1941d9ca678308149.tar.gz |
We already use PublicInbox::DS in this test and I've always found the terminology of sig* APIs confusing :x
Diffstat (limited to 't')
-rw-r--r-- | t/sigfd.t | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -6,15 +6,14 @@ use POSIX qw(:signal_h); use Errno qw(ENOSYS); use PublicInbox::Syscall qw(SFD_NONBLOCK); require_ok 'PublicInbox::Sigfd'; +use PublicInbox::DS; SKIP: { if ($^O ne 'linux' && !eval { require IO::KQueue }) { skip 'signalfd requires Linux or IO::KQueue to emulate', 10; } - my $new = POSIX::SigSet->new; - $new->fillset or die "sigfillset: $!"; - my $old = POSIX::SigSet->new; - sigprocmask(SIG_SETMASK, $new, $old) or die "sigprocmask $!"; + + my $old = PublicInbox::DS::block_signals(); my $hit = {}; my $sig = {}; local $SIG{HUP} = sub { $hit->{HUP}->{normal}++ }; @@ -25,7 +24,6 @@ SKIP: { } my $sigfd = PublicInbox::Sigfd->new($sig, 0); if ($sigfd) { - require PublicInbox::DS; ok($sigfd, 'Sigfd->new works'); kill('HUP', $$) or die "kill $!"; kill('INT', $$) or die "kill $!"; |