}
use Msg;
+use IntMsg;
use DXVars;
use DXDebug;
use DXUtil;
# terminate a child
sub sig_chld
{
- $SIG{CHLD} = \&sig_chld;
- $waitedpid = wait;
- dbg('connect', "caught $pid");
+ unless ($^O =~ /^MS/i) {
+ $SIG{CHLD} = \&sig_chld;
+ $waitedpid = wait;
+ dbg('connect', "caught $waitedpid");
+ }
}
$out_lineend = "\r\n";
}
$/ = $mynl;
+ $out_lineend = $mynl;
}
# handle incoming messages
$sock->output_record_separator('');
$sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO);
$sock->open($host) or die "Can't connect to $host port $port $!";
+ if ($port == 23) {
+ $sock->telnetmode(1);
+ $sock->option_send(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO) if $port == 23;
+ } else {
+ $sock->telnetmode(0);
+ }
$sock->binmode(0);
$mode = 3;
} elsif ($sort eq 'ax25' || $sort eq 'prog') {
$stdout->autoflush(1);
-$SIG{'INT'} = \&sig_term;
-$SIG{'TERM'} = \&sig_term;
-$SIG{'HUP'} = \&sig_term;
-$SIG{'CHLD'} = \&sig_chld;
-$SIG{'ALRM'} = \&timeout;
+unless ($^O =~ /^MS/i) {
+ $SIG{'INT'} = \&sig_term;
+ $SIG{'TERM'} = \&sig_term;
+ $SIG{'HUP'} = \&sig_term;
+ $SIG{'CHLD'} = \&sig_chld;
+}
dbgadd('connect');
}
-$conn = Msg->connect("$clusteraddr", $clusterport, \&rec_socket);
+$conn = IntMsg->connect("$clusteraddr", $clusterport, \&rec_socket);
if (! $conn) {
if (-r "$data/offline") {
open IN, "$data/offline" or die;
for (;;) {
my $t;
- Msg->event_loop(1, 1);
+ Msg->event_loop(1, 0.1);
$t = time;
if ($t > $lasttime) {
if ($outqueue) {