X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=d026edd66617667bfeaf1010b07b5aaac83606cd;hb=1c5b4284c88ad06c4674198ddf5eb6590ba6cd17;hp=aa44006786c5d382925d10e45cb324f0ca162766;hpb=f155969d600561b9ef151a7ce2494a0c89aed033;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index aa440067..d026edd6 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -71,7 +71,7 @@ package main; @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) -$version = "1.41"; # the version no of the software +$version = "1.42"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name @outstanding_connects = (); # list of outstanding connects @@ -106,6 +106,11 @@ sub rec if (!defined $msg || (defined $err && $err)) { if ($dxchan) { + if (defined $err) { + $conn->disconnect; + undef $conn; + $dxchan->conn(undef); + } $dxchan->disconnect; } elsif ($conn) { $conn->disconnect; @@ -375,6 +380,11 @@ dbg('err', "orft we jolly well go ..."); #open(DB::OUT, "|tee /tmp/aa"); +$SIG{PIPE} = sub { + #$DB::single = 1; + dbg('err', "Broken PIPE signal received"); +}; + for (;;) { my $timenow; # $DB::trace = 1;