X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fclient.pl;h=f159ee79ed200153d39cf0e9b01631a9aadec35d;hb=923eb0fbe7e3dc483338c6f2754ab6f413f89c95;hp=ddf3fd3ba6adba52f6ed6f19ccab464d613dbd05;hpb=dc016a0633cdb15d29b9a71fdec2c230fbad201b;p=spider.git diff --git a/perl/client.pl b/perl/client.pl index ddf3fd3b..f159ee79 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -39,6 +39,7 @@ BEGIN { } use Msg; +use IntMsg; use DXVars; use DXDebug; use DXUtil; @@ -78,9 +79,11 @@ sub sig_term # 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"); + } } @@ -401,11 +404,12 @@ if ($call eq $mycall) { $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'); @@ -520,7 +524,7 @@ if ($ssid) { } -$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; @@ -541,7 +545,7 @@ Msg->set_event_handler($stdin, "read" => \&rec_stdin); for (;;) { my $t; - Msg->event_loop(1, 1); + Msg->event_loop(1, 0.1); $t = time; if ($t > $lasttime) { if ($outqueue) {