X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=f7b0d5f4690e7b7edbefb6d3335bc540cd24d9c0;hb=657c8a98e43d11ffdf6294984efef8ec164e754e;hp=2a88f5b5db7aff99cd7dc3bf8d2ba86f6b3f5ef4;hpb=4d03e2c0f1feb9aa6011d6d72b0dd6e95b71da13;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index 2a88f5b5..f7b0d5f4 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -550,7 +550,11 @@ sub on_disconnect while (@ARGV && $ARGV[0] =~ /^-/) { my $arg = shift; - dbgadd('console'), $maxshist = 200 if $arg eq '-x'; + if ($arg eq '-x') { + dbginit(); + dbgadd('console'); + $maxshist = 200; + } } $call = uc shift @ARGV if @ARGV; @@ -569,8 +573,6 @@ if ($call eq $mycall) { exit(0); } -dbginit(); - unless ($DB::VERSION) { $SIG{'INT'} = \&sig_term; $SIG{'TERM'} = \&sig_term; @@ -592,7 +594,7 @@ $conn = IntMsg->connect($clusteraddr, $clusterport, rproc => \&rec_socket); $conn->{on_connect} = \&on_connect; $conn->{on_disconnect} = \&on_disconnect; -my $timer = Mojo::IOLoop->recurring(1, sub {DXLog::flushall()}); +my $timer = Mojo::IOLoop->recurring(1, sub {DXLog::flushall()}) if $DXDebug::fp; $idle = Mojo::IOLoop->recurring(0.100 => \&idle_loop); Mojo::IOLoop->singleton->reactor->io(\*STDIN => sub {