~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/dtr_process.pl

  • Committer: Brian Aker
  • Date: 2010-11-08 17:40:41 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108174041-owap774v8l5vvnl4
Push some functions behind classes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
    dtr_debug("  - drizzled " .
357
357
              "(pid: $srv->{pid}; " .
358
358
              "pid file: '$srv->{path_pid}'; " .
359
 
              "socket: '$srv->{sockfile}'; ".
 
359
              "socket: '$srv->{path_sock}'; ".
360
360
              "port: $srv->{port})");
361
361
 
362
362
    my $pid= dtr_server_shutdown($srv);
367
367
    push(@kill_pids,{
368
368
                     pid      => $srv->{'pid'},
369
369
                     pidfile  => $srv->{'path_pid'},
370
 
                     sockfile => $srv->{'sockfile'},
 
370
                     sockfile => $srv->{'path_sock'},
371
371
                     port     => $srv->{'port'},
372
372
                    });
373
373
    $srv->{'pid'}= 0; # Assume we are done with it
590
590
      {
591
591
        dtr_error("can't remove $srv->{'pidfile'}");
592
592
      }
593
 
      if ( -f $srv->{'sockfile'} and ! unlink($srv->{'sockfile'}) and
594
 
           -f $srv->{'sockfile'} )
595
 
      {
596
 
        dtr_error("can't remove $srv->{'sockfile'}");
597
 
      }
598
593
    }
599
594
  }
600
595
 
613
608
    my $errors= 0;
614
609
    foreach my $srv ( @$spec )
615
610
    {
616
 
      if ( $srv->{'sockfile'} )
617
 
      {
618
 
        unlink($srv->{'sockfile'});
619
 
      }
620
611
      if ( $srv->{'pid'} )
621
612
      {
622
613
        # Server has been hard killed, clean it's resources
691
682
  dtr_add_arg($args, "--password=");
692
683
  dtr_add_arg($args, "--silent");
693
684
 
 
685
  if ( -e $srv->{'path_sock'} )
 
686
  {
 
687
    dtr_add_arg($args, "--socket=%s", $srv->{'path_sock'});
 
688
  }
 
689
 
694
690
  if ( $srv->{'port'} )
695
691
  {
696
692
    dtr_add_arg($args, "--port=%s", $srv->{'port'});
697
693
  }
698
694
 
699
 
  dtr_add_arg($args, "--connect-timeout=5");
 
695
  dtr_add_arg($args, "--connect_timeout=5");
700
696
 
701
697
  my $pid= dtr_spawn($::exe_drizzle, $args,
702
698
                     "", "", "", "", { append_log_file => 1 });