return " $DXNode::nodes nodes, $users local / $tot total users Max users $DXNode::maxusers Uptime $uptime";
}
-sub DESTROY
-{
- my $self = shift;
- dbg('cluster', "destroying $self->{call}\n");
-}
+#sub DESTROY
+#{
+# my $self = shift;
+# dbg('cluster', "destroying $self->{call}\n");
+#}
no strict;
sub AUTOLOAD
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(Log);
+@EXPORT = qw(Log Logclose);
use FileHandle;
use DXVars;
$log->writeunix($t, join('^', $t, @_) );
}
-sub DESTROY # catch undefs and do what is required further down the tree
+sub Logclose
{
- my $self = shift;
-# DXDebug::dbg("dxlog", "closing $self->{fn}\n");
- undef $self->{fh} if defined $self->{fh};
-}
+ $log->close();
+}
1;
return unless defined($sock);
set_event_handler ($sock, "read" => undef, "write" => undef);
shutdown($sock, 3);
+ close($sock);
}
sub send_now {
use IO::Socket;
use IPC::Open2;
use Net::Telnet qw(TELOPT_ECHO);
-use Carp;
+use Carp qw{cluck};
# cease communications
sub cease
kill(9, $pid);
}
dbgclose();
+# $SIG{__WARN__} = sub {my $a = shift; cluck($a); };
sleep(1);
exit(0);
}
use Local;
use Fcntl ':flock';
-use Carp;
+use Carp qw(cluck);
package main;
dbg('chan', "DXSpider version $version ended");
Log('cluster', "DXSpider V$version stopped");
dbgclose();
+ Logclose();
unlink $lockfn;
+# $SIG{__WARN__} = $SIG{__DIE__} = sub {my $a = shift; cluck($a); };
exit(0);
}