about summary refs log tree commit homepage
path: root/lib/PublicInbox/Sigfd.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-10 12:15:00 +0000
committerEric Wong <e@80x24.org>2021-01-12 03:51:42 +0000
commitb90e8d6e02852c47d0c08198d8c7afb5dbe008d7 (patch)
treeea3b399fba66acbd5b67bb5d1b983340ddcc17d3 /lib/PublicInbox/Sigfd.pm
parentf4cf089b427d07bedb80fcfbe79d84234ad92a75 (diff)
downloadpublic-inbox-b90e8d6e02852c47d0c08198d8c7afb5dbe008d7.tar.gz
This lets us call dwaitpid long before a process exits
and not have to wait around for it.

This is advantageous for lei where we can run dwaitpid on the
pager as soon as we spawn it, instead of waiting for a client
socket to go away on DESTROY.
Diffstat (limited to 'lib/PublicInbox/Sigfd.pm')
-rw-r--r--lib/PublicInbox/Sigfd.pm12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/PublicInbox/Sigfd.pm b/lib/PublicInbox/Sigfd.pm
index db0bf523..a4d1b3bb 100644
--- a/lib/PublicInbox/Sigfd.pm
+++ b/lib/PublicInbox/Sigfd.pm
@@ -7,7 +7,7 @@ package PublicInbox::Sigfd;
 use strict;
 use parent qw(PublicInbox::DS);
 use PublicInbox::Syscall qw(signalfd EPOLLIN EPOLLET SFD_NONBLOCK);
-use POSIX qw(:signal_h);
+use POSIX ();
 use IO::Handle ();
 
 # returns a coderef to unblock signals if neither signalfd or kqueue
@@ -63,14 +63,4 @@ sub event_step {
         while (wait_once($_[0])) {} # non-blocking
 }
 
-sub sig_setmask { sigprocmask(SIG_SETMASK, @_) or die "sigprocmask: $!" }
-
-sub block_signals () {
-        my $oldset = POSIX::SigSet->new;
-        my $newset = POSIX::SigSet->new;
-        $newset->fillset or die "fillset: $!";
-        sig_setmask($newset, $oldset);
-        $oldset;
-}
-
 1;