]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Xapcmd.pm
testcommon: DESTROY: wait for killed daemon
[public-inbox.git] / lib / PublicInbox / Xapcmd.pm
index 8e2b9063c7443e3f0b8916560e22f054789dc71b..337978bd1a8799b79d10a315341333b06cf6ae3c 100644 (file)
@@ -142,7 +142,11 @@ sub process_queue {
                while (scalar keys %pids) {
                        my $pid = waitpid(-1, 0);
                        my $args = delete $pids{$pid};
-                       die join(' ', @$args)." failed: $?\n" if $?;
+                       if ($args) {
+                               die join(' ', @$args)." failed: $?\n" if $?;
+                       } else {
+                               warn "unknown PID($pid) reaped: $?\n";
+                       }
                }
        }
 }