+ reap_live() while keys(%$LIVE);
+}
+
+sub dump_manifest ($$) {
+ my ($m, $ft) = @_;
+ # write the smaller manifest if epochs were skipped so
+ # users won't have to delete manifest if they +w an
+ # epoch they no longer want to skip
+ my $json = PublicInbox::Config->json->encode($m);
+ my $mtime = (stat($ft))[9];
+ seek($ft, SEEK_SET, 0) or die "seek($ft): $!";
+ truncate($ft, 0) or die "truncate($ft): $!";
+ gzip(\$json => $ft) or die "gzip($ft): $GzipError";
+ $ft->flush or die "flush($ft): $!";
+ utime($mtime, $mtime, "$ft") or die "utime(..., $ft): $!";