From 12041dbf48c9a02a60c44b665227e185bc5590a4 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Fri, 25 Mar 2016 22:57:47 +0000 Subject: [PATCH] make sure DXCron::spawn records output --- perl/DXCron.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl/DXCron.pm b/perl/DXCron.pm index e90865f3..f9a4f07e 100644 --- a/perl/DXCron.pm +++ b/perl/DXCron.pm @@ -247,7 +247,7 @@ sub spawn my $fc = Mojo::IOLoop::ForkCall->new; $fc->run( sub {my @res = `$line`; return @res}, - undef, + [], sub { my ($fc, $err, @res) = @_; if (defined $err) { @@ -255,7 +255,10 @@ sub spawn dbg($s); return; } - dbg("DXCron::spawn: $_") for @res; + for (@res) { + chomp; + dbg("DXCron::spawn: $_") if isdbg("cron"); + } } ); } -- 2.43.0