Lack of signalfd/EVFILT_SIGNAL means we need to kill a
process repeatedly to ensure it wakes up.
---
t/lei-refresh-mail-sync.t | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/lei-refresh-mail-sync.t b/t/lei-refresh-mail-sync.t
index 0498a0c4..8ccc68c6 100644
--- a/t/lei-refresh-mail-sync.t
+++ b/t/lei-refresh-mail-sync.t
@@ -137,8 +137,12 @@ SKIP: {
my $ar = PublicInbox::AutoReap->new($pid);
ok(!(lei 'refresh-mail-sync', $url), 'URL fails on dead -imapd');
ok(!(lei 'refresh-mail-sync', '--all'), '--all fails on dead -imapd');
- $ar->kill for qw(avoid sig wake miss-no signalfd or EVFILT_SIG);
- $ar->join('TERM');
+ {
+ local $SIG{CHLD} = sub { $ar->join('TERM'); undef $ar };
+ do {
+ eval { $ar->kill and tick(0.01) }
+ } while (defined($ar));
+ }
my $cmd = $srv->{imapd}->{cmd};
my $s = $srv->{imapd}->{s};