my $sig = delete $self->{sig};
$sig->{CHLD} = 'DEFAULT';
@SIG{keys %$sig} = values %$sig;
- PublicInbox::DS::sig_setmask($self->{oldset});
+ PublicInbox::DS::sig_setmask(PublicInbox::DS::allowset($sig));
}
sub watch_atfork_parent ($) { _done_for_now($_[0]) }
}
sub watch { # main entry point
- my ($self, $sig, $oldset) = @_;
- $self->{oldset} = $oldset;
+ my ($self, $sig) = @_;
my $first_sig;
$self->{sig} //= ($first_sig = $sig);
my $poll = {}; # intvl_seconds => [ uri1, uri2 ]
}
watch_fs_init($self) if $self->{mdre};
local @PublicInbox::DS::post_loop_do = (sub { !$self->quit_done });
- PublicInbox::DS::event_loop($first_sig, $oldset); # calls ->event_step
+ PublicInbox::DS::event_loop($first_sig); # calls ->event_step
_done_for_now($self);
}
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::DS::block_signals();
+PublicInbox::DS::block_signals();
STDOUT->autoflush(1);
STDERR->autoflush(1);
local $0 = $0; # local since this script may be eval-ed
# --no-scan is only intended for testing atm, undocumented.
PublicInbox::DS::requeue($scan) if $do_scan;
- $watch->watch($sig, $oldset) while ($watch);
+ $watch->watch($sig) while ($watch);
}