From 657c8a98e43d11ffdf6294984efef8ec164e754e Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Fri, 10 Jul 2020 23:20:49 +0100 Subject: [PATCH] stop dbg init when not in debug mode. This fixes problems reported when running console.pl not as the sysop user. --- Changes | 4 ++++ perl/console.pl | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index d9ddffa6..b76642bf 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +10Jul20======================================================================= +1. Fix console.pl permissions problem when running as another user not in + debug mode. Console.pl WILL NOT WORK in debug mode unless it is running + as the sysop user. 08Jul20======================================================================= 1. "Finish" the RBN system :-) 2. This includes enabling the coarse selection of spot modes using set/wantrbn 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 { -- 2.43.0