X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCron.pm;h=42dbe2a5d6053d951db5cff878df0e8cae8e6652;hb=9bba449d12641232d51d259f470ce6b21205c622;hp=d300779456931861463060bf80ed80779cb5bc58;hpb=85b6ea316f8da5cb0a9fe716bbb5cd17bd2f5fdb;p=spider.git diff --git a/perl/DXCron.pm b/perl/DXCron.pm index d3007794..42dbe2a5 100644 --- a/perl/DXCron.pm +++ b/perl/DXCron.pm @@ -217,21 +217,7 @@ sub disconnect { my $call = uc shift; my $dxchan = DXChannel->get($call); - if ($dxchan) { - if ($dxchan->is_ak1a) { - $dxchan->send_now("D", DXProt::pc39($main::mycall, "$main::mycall DXCron")); - } else { - $dxchan->send_now('D', ""); - } - $dxchan->disconnect; - } - my $out = grep {$_->{call} eq $call} @main::outstanding_connects; - if ($out) { - unless ($^O =~ /^MS/i) { - kill 'TERM', $out->{pid}; - } - @main::outstanding_connects = grep {$_->{call} ne $call} @main::outstanding_connects; - } + $dxchan->disconnect if $dxchan; } # start a connect process off @@ -240,7 +226,7 @@ sub start_connect my $call = uc shift; my $lccall = lc $call; - if (grep {$_->{call} eq $call} @main::outstanding_connects) { + if (Msg->conns($call)) { dbg('cron', "Connect not started, outstanding connect to $call"); return; } @@ -262,14 +248,14 @@ sub spawn # in child, unset warnings, disable debugging and general clean up from us $^W = 0; eval "{ package DB; sub DB {} }"; - alarm(0); DXChannel::closeall(); for (@main::listeners) { $_->close_server; } - unless ($^O =~ /^MS/) { + unless ($main::is_win) { $SIG{HUP} = 'IGNORE'; $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT'; + alarm(0); } exec "$line" or dbg('cron', "exec '$line' failed $!"); }