- alarm(1) unless (grep(/\A--no-scan\z/, @ARGV));
- $watch_md->watch while ($watch_md);
+ unless (grep(/\A--no-scan\z/, @ARGV)) {
+ PublicInbox::DS::requeue($scan);
+ }
+ my $sigfd = PublicInbox::Sigfd->new($sig, $SFD_NONBLOCK);
+ local %SIG = (%SIG, %$sig) if !$sigfd;
+ if (!$sigfd) {
+ PublicInbox::Sigfd::set_sigmask($oldset);
+ PublicInbox::DS->SetLoopTimeout(1000);
+ }
+ $watch_md->watch($sig, $oldset) while ($watch_md);