X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fconnect.pl;h=14f94bb3e4a93c31924091dc7b4b500dac28ff6f;hb=ad321e7b7e2172228be4ce694d740e4f9629d383;hp=ed6ba9a07a8286dbfd622bc7397af452be741df1;hpb=f3adc82a0299652d929b73c718127fa38571eec5;p=spider.git diff --git a/cmd/connect.pl b/cmd/connect.pl index ed6ba9a0..14f94bb3 100644 --- a/cmd/connect.pl +++ b/cmd/connect.pl @@ -5,7 +5,7 @@ my $self = shift; my $call = uc shift; my $lccall = lc $call; -return (0) if $self->priv < 8; +return (1, $self->msg('e5')) if $self->priv < 5; return (1, $self->msg('e6')) unless $call gt ' '; return (1, $self->msg('already', $call)) if DXChannel->get($call); return (1, $self->msg('conscript', $lccall)) unless -e "$main::root/connect/$lccall"; @@ -18,11 +18,14 @@ if (defined $pid) { if (!$pid) { # in child, unset warnings, disable debugging and general clean up from us $^W = 0; + $SIG{HUP} = 'IGNORE'; eval "{ package DB; sub DB {} }"; alarm(0); + DXChannel::closeall(); $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT'; exec $prog, $call, 'connect'; } else { + sleep(1); # do a coordination return(1, $self->msg('constart', $call)); } }