projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nospawnify some of the commands
[spider.git]
/
perl
/
DXCron.pm
diff --git
a/perl/DXCron.pm
b/perl/DXCron.pm
index e60d36b4ba8f02f934c2842a030c57cde11c4cfb..0cc6ce88d85ec36e7fa8617627fb724f41d9bb68 100644
(file)
--- a/
perl/DXCron.pm
+++ b/
perl/DXCron.pm
@@
-249,7
+249,6
@@
sub spawn
my $fc = Mojo::IOLoop::Subprocess->new();
$fc->run(
sub {my @res = `$line`; return @res},
my $fc = Mojo::IOLoop::Subprocess->new();
$fc->run(
sub {my @res = `$line`; return @res},
-# [],
sub {
my ($fc, $err, @res) = @_;
if ($err) {
sub {
my ($fc, $err, @res) = @_;
if ($err) {
@@
-272,8
+271,12
@@
sub spawn_cmd
dbg("spawn_cmd run: $line") if isdbg('cron');
my $fc = Mojo::IOLoop::Subprocess->new();
$fc->run(
dbg("spawn_cmd run: $line") if isdbg('cron');
my $fc = Mojo::IOLoop::Subprocess->new();
$fc->run(
- sub {my @res = DXCommandmode::run_cmd($main::me, $line); return @res},
-# [],
+ sub {
+ $main::me->{_nospawn} = 1;
+ my @res = $main::me->run_cmd($line);
+ delete $main::me->{_nospawn};
+ return @res;
+ },
sub {
my ($fc, $err, @res) = @_;
if ($err) {
sub {
my ($fc, $err, @res) = @_;
if ($err) {
@@
-305,7
+308,7
@@
sub rcmd
sub run_cmd
{
my $line = shift;
sub run_cmd
{
my $line = shift;
- my @in =
DXCommandmode::run_cmd($main::me,
$line);
+ my @in =
$main::me->run_cmd(
$line);
dbg("cmd run: $line") if isdbg('cron');
for (@in) {
s/\s*$//og;
dbg("cmd run: $line") if isdbg('cron');
for (@in) {
s/\s*$//og;