projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some heristics for console/xterms
[spider.git]
/
perl
/
DXCron.pm
diff --git
a/perl/DXCron.pm
b/perl/DXCron.pm
index 507a6a12a81053d9de0e6f136da6381beb73cce6..c0565fa1e9e8268b2c3c8aed8719398227f91409 100644
(file)
--- a/
perl/DXCron.pm
+++ b/
perl/DXCron.pm
@@
-12,7
+12,7
@@
use DXVars;
use DXUtil;
use DXM;
use DXDebug;
use DXUtil;
use DXM;
use DXDebug;
-use
FileHand
le;
+use
IO::Fi
le;
use Carp;
use strict;
use Carp;
use strict;
@@
-58,7
+58,7
@@
sub init
sub cread
{
my $fn = shift;
sub cread
{
my $fn = shift;
- my $fh = new
FileHand
le;
+ my $fh = new
IO::Fi
le;
my $line = 0;
dbg('cron', "cron: reading $fn\n");
my $line = 0;
dbg('cron', "cron: reading $fn\n");
@@
-247,8
+247,7
@@
sub start_connect
alarm(0);
DXChannel::closeall();
$SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
alarm(0);
DXChannel::closeall();
$SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
- exec $prog, $call, 'connect';
- dbg('cron', "exec '$prog' failed $!");
+ exec $prog, $call, 'connect' or dbg('cron', "exec '$prog' failed $!");
}
dbg('cron', "connect to $call started");
} else {
}
dbg('cron', "connect to $call started");
} else {
@@
-274,8
+273,7
@@
sub spawn
alarm(0);
DXChannel::closeall();
$SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
alarm(0);
DXChannel::closeall();
$SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
- exec "$line";
- dbg('cron', "exec '$line' failed $!");
+ exec "$line" or dbg('cron', "exec '$line' failed $!");
}
dbg('cron', "spawn of $line started");
} else {
}
dbg('cron', "spawn of $line started");
} else {