]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/TestCommon.pm
t/lei-refresh-mail-sync: avoid kill+sleep loop
[public-inbox.git] / lib / PublicInbox / TestCommon.pm
index 1fe7931e13f241e1cf0a6e20c0af3960fcb2a270..8a34e45a24a48d2d6682e0298380bdbe222c2b54 100644 (file)
@@ -480,6 +480,9 @@ sub start_script {
        my $pid = fork // die "fork: $!\n";
        if ($pid == 0) {
                eval { PublicInbox::DS->Reset };
+               for (@{delete($opt->{-CLOFORK}) // []}) {
+                       close($_) or die "close $!";
+               }
                # pretend to be systemd (cf. sd_listen_fds(3))
                # 3 == SD_LISTEN_FDS_START
                my $fd;