about summary refs log tree commit homepage
path: root/script/public-inbox-watch
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 /script/public-inbox-watch
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 'script/public-inbox-watch')
-rwxr-xr-xscript/public-inbox-watch4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/public-inbox-watch b/script/public-inbox-watch
index 9ada9c3b..10c7cd6f 100755
--- a/script/public-inbox-watch
+++ b/script/public-inbox-watch
@@ -19,7 +19,7 @@ my $do_scan = 1;
 GetOptions('scan!' => \$do_scan, # undocumented, testing only
         'help|h' => \(my $show_help)) or do { print STDERR $help; exit 1 };
 if ($show_help) { print $help; exit 0 };
-my $oldset = PublicInbox::Sigfd::block_signals();
+my $oldset = PublicInbox::DS::block_signals();
 STDOUT->autoflush(1);
 STDERR->autoflush(1);
 local $0 = $0; # local since this script may be eval-ed
@@ -60,7 +60,7 @@ if ($watch) {
         my $sigfd = PublicInbox::Sigfd->new($sig, SFD_NONBLOCK);
         local %SIG = (%SIG, %$sig) if !$sigfd;
         if (!$sigfd) {
-                PublicInbox::Sigfd::sig_setmask($oldset);
+                PublicInbox::DS::sig_setmask($oldset);
                 PublicInbox::DS->SetLoopTimeout(1000);
         }
         $watch->watch($sig, $oldset) while ($watch);