~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to lib/GenTest/App/GenTest.pm

misc fixes to make replication Reporters more stable and not rely on fixed sleep()s

Show diffs side-by-side

added added

removed removed

Lines of Context:
474
474
    } elsif ($process_type == PROCESS_TYPE_PERIODIC) {
475
475
        ## Periodic does not use channel
476
476
        $channel->close();
 
477
        my $killed = 0;
 
478
        local $SIG{TERM} = sub { $killed = 1 };
 
479
 
477
480
        while (1) {
478
481
            my $reporter_status = $reporter_manager->monitor(REPORTER_TYPE_PERIODIC);
479
482
            $self->stop_child($reporter_status) if $reporter_status > STATUS_CRITICAL_FAILURE;
 
483
            last if $killed == 1;
480
484
            sleep(10);
481
485
        }
482
486
        $self->stop_child(STATUS_OK);