2 # connect a cluster station
8 return (1, $self->msg('e5')) if $self->priv < 5;
9 return (1, $self->msg('e6')) unless $call gt ' ';
10 return (1, $self->msg('already', $call)) if DXChannel->get($call);
11 return (1, $self->msg('outconn', $call)) if grep {$_->{call} eq $call} @main::outstanding_connects;
12 return (1, $self->msg('conscript', $lccall)) unless -e "$main::root/connect/$lccall";
14 my $prog = "$main::root/local/client.pl";
15 $prog = "$main::root/perl/client.pl" if ! -e $prog;
20 # in child, unset warnings, disable debugging and general clean up from us
23 eval "{ package DB; sub DB {} }";
25 DXChannel::closeall();
27 $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
28 exec $prog, $call, 'connect';
30 sleep(1); # do a coordination
31 push @main::outstanding_connects, {call => $call, pid => $pid};
32 return(1, $self->msg('constart', $call));
35 return (0, $self->msg('confail', $call, $!))