~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/dtr_process.pl

  • Committer: Monty Taylor
  • Date: 2010-11-18 07:03:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1946.
  • Revision ID: mordred@inaugust.com-20101118070309-pi09o1fvn89oxd5b
Fixes the issues with socket

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->{path_sock}'; ".
 
359
              "socket: '$srv->{sockfile}'; ".
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->{'path_sock'},
 
370
                     sockfile => $srv->{'sockfile'},
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
      }
593
598
    }
594
599
  }
595
600
 
608
613
    my $errors= 0;
609
614
    foreach my $srv ( @$spec )
610
615
    {
 
616
      if ( $srv->{'sockfile'} )
 
617
      {
 
618
        unlink($srv->{'sockfile'});
 
619
      }
611
620
      if ( $srv->{'pid'} )
612
621
      {
613
622
        # Server has been hard killed, clean it's resources
682
691
  dtr_add_arg($args, "--password=");
683
692
  dtr_add_arg($args, "--silent");
684
693
 
685
 
  if ( -e $srv->{'path_sock'} )
686
 
  {
687
 
    dtr_add_arg($args, "--socket=%s", $srv->{'path_sock'});
688
 
  }
689
 
 
690
694
  if ( $srv->{'port'} )
691
695
  {
692
696
    dtr_add_arg($args, "--port=%s", $srv->{'port'});