* [PATCH] zombie-fix
@ 2020-06-29 8:46 Eric Wong
2020-06-29 8:47 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2020-06-29 8:46 UTC (permalink / raw)
To: meta
---
lib/PublicInbox/WatchMaildir.pm | 8 +++++---
script/public-inbox-watch | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index ec28a3034ff..95a9b256b12 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -123,9 +123,10 @@ sub new {
sub _done_for_now {
my ($self) = @_;
- my $importers = $self->{importers};
- foreach my $im (values %$importers) {
+ my $sigfd = $self->{sigfd};
+ foreach my $im (values %{$self->{importers}}) {
$im->done;
+ $sigfd->event_step if $sigfd; # check signals
}
}
@@ -910,9 +911,10 @@ sub watch_nntp_init ($$) {
}
sub watch {
- my ($self, $sig, $oldset) = @_;
+ my ($self, $sig, $oldset, $sigfd) = @_;
$self->{oldset} = $oldset;
$self->{sig} = $sig;
+ $self->{sigfd} = $sigfd;
my $poll = {}; # intvl_seconds => [ url1, url2 ]
watch_imap_init($self, $poll) if $self->{imap};
watch_nntp_init($self, $poll) if $self->{nntp};
diff --git a/script/public-inbox-watch b/script/public-inbox-watch
index c07d45d74ae..8f0200688ed 100755
--- a/script/public-inbox-watch
+++ b/script/public-inbox-watch
@@ -41,5 +41,5 @@ if ($watch_md) {
PublicInbox::Sigfd::set_sigmask($oldset);
PublicInbox::DS->SetLoopTimeout(1000);
}
- $watch_md->watch($sig, $oldset) while ($watch_md);
+ $watch_md->watch($sig, $oldset, $sigfd) while ($watch_md);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zombie-fix
2020-06-29 8:46 [PATCH] zombie-fix Eric Wong
@ 2020-06-29 8:47 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2020-06-29 8:47 UTC (permalink / raw)
To: meta
Oops, missent barely tested patch :x.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-29 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29 8:46 [PATCH] zombie-fix Eric Wong
2020-06-29 8:47 ` Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).