From: Dirk Koopman Date: Fri, 25 Mar 2016 22:57:47 +0000 (+0000) Subject: make sure DXCron::spawn records output X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=12041dbf48c9a02a60c44b665227e185bc5590a4;p=spider.git make sure DXCron::spawn records output --- 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"); + } } ); }