summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmysql-test/mysql-test-run.pl12
1 files changed, 7 insertions, 5 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index f3ffdf90547..bb044a1388b 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -661,12 +661,14 @@ sub main {
foreach my $pid (keys %children)
{
my $ret_pid= waitpid($pid, 0);
- if ($ret_pid != $pid){
- mtr_report("Unknown process $ret_pid exited");
- }
- else {
- delete $children{$ret_pid};
+ if ($ret_pid == -1) {
+ # Child was automatically reaped. Probably not possible
+ # unless you $SIG{CHLD}= 'IGNORE'
+ mtr_report("Child ${pid} was automatically reaped (this should never happend)");
+ } elsif ($ret_pid != $pid) {
+ confess("Unexpected PID ${ret_pid} instead of expected ${pid}");
}
+ delete $children{$ret_pid};
}
}