Re: Debian Sparc Perl problem
> Ahh. Good point. I forgot to uncomment the Timeout setting. Problem > reproduced. Seems it's not a Debian problem then. I'll take this somewhere else. Thanks for testing for me. -- Ian Cass
Re: Debian Sparc Perl problem
On Fri, 2003-01-17 at 11:37, Ian Cass wrote: > > This problem is specific to Debian. Aurora SPARC Linux gives the > > expected output: > > [EMAIL PROTECTED] root]# perl server.pl > > It's the client that generates the errors, but only when Timeout is > specified Ahh. Good point. I forgot to uncomment the Timeout setting. Problem reproduced. ~spot --- Tom "spot" Callaway (SAIR LCA, RHCE) GPG: D786 8B22 D9DB 1F8B 4AB7 448E 3C5E 99AD 9305 4260 Red Hat Sales Engineer :: http://www.redhat.com Aurora SPARC Linux Project Leader :: http://www.auroralinux.org The words and opinions reflected in this message do not necessarily reflect those of my employer, Red Hat, or my project, Aurora SPARC Linux and belong solely to me. Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!
Re: Debian Sparc Perl problem
On Fri, 2003-01-17 at 11:37, Ian Cass wrote: > > This problem is specific to Debian. Aurora SPARC Linux gives the > > expected output: > > [EMAIL PROTECTED] root]# perl server.pl > > It's the client that generates the errors, but only when Timeout is > specified This works properly as well: [EMAIL PROTECTED] root]# perl client.pl Sending test 0 Received Sending test 1 Received Sending test 2 Received Sending test 3 Received Sending test 4 Received Sending test 5 Received Sending test 6 Received ~spot --- Tom "spot" Callaway (SAIR LCA, RHCE) GPG: D786 8B22 D9DB 1F8B 4AB7 448E 3C5E 99AD 9305 4260 Red Hat Sales Engineer :: http://www.redhat.com Aurora SPARC Linux Project Leader :: http://www.auroralinux.org The words and opinions reflected in this message do not necessarily reflect those of my employer, Red Hat, or my project, Aurora SPARC Linux and belong solely to me. Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!
Re: Debian Sparc Perl problem
> This problem is specific to Debian. Aurora SPARC Linux gives the > expected output: > [EMAIL PROTECTED] root]# perl server.pl It's the client that generates the errors, but only when Timeout is specified oasis:~# perl tests.pl Sending test 0 ERROR Resource temporarily unavailable Received Sending test 1 ERROR Resource temporarily unavailable Received Sending test 2 ERROR Resource temporarily unavailable Received Sending test 3 ERROR Resource temporarily unavailable Received Sending test 4 ERROR Resource temporarily unavailable Received Sending test 5 ERROR Resource temporarily unavailable Received Sending test 6 ERROR Resource temporarily unavailable Received Sending test 7 ERROR Resource temporarily unavailable Received Sending test 8 ERROR Resource temporarily unavailable Received Sending test 9 ERROR Resource temporarily unavailable Received -- Ian Cass
Re: Debian Sparc Perl problem
On Fri, 2003-01-17 at 08:57, Ian Cass wrote: > Hi, > > I've got a problem here with some Perl & I don't know if it's Debian or not. > I can only replicate it on Debian Sparc, but I have no other Linux/Sparc to > test it on. The code works perfectly on Debian i386 & OpenBSD i386. > > I've got an app that passes messages to another app on the same machine > using tcp sockets. Using IO::Socket::INET, Blocking reads do not work if I > set a Timeout. Any reads (either <$socket> or $socket->getline) will return > a 'Resource temporarily unavailable' like you'd get if you had no data to > read when you're using non blocking IO (EAGAIN). If I remove the Timeout > parameter, it works as expected. This problem is specific to Debian. Aurora SPARC Linux gives the expected output: [EMAIL PROTECTED] root]# perl server.pl Accepted a new client Read Read Read Read Read Read Read [EMAIL PROTECTED] root]# perl -v This is perl, v5.6.1 built for sparc-linux Copyright 1987-2001, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. [EMAIL PROTECTED] root]# uname -a Linux fry.rdu.redhat.com 2.4.18-0.96sparc #1 Fri Jun 7 04:07:21 EDT 2002 sparc64 unknown ~spot --- Tom "spot" Callaway (SAIR LCA, RHCE) GPG: D786 8B22 D9DB 1F8B 4AB7 448E 3C5E 99AD 9305 4260 Red Hat Sales Engineer :: http://www.redhat.com Aurora SPARC Linux Project Leader :: http://www.auroralinux.org The words and opinions reflected in this message do not necessarily reflect those of my employer, Red Hat, or my project, Aurora SPARC Linux and belong solely to me. Save Firefly! :: http://www.fireflysupport.com/ :: Keep Flying!
Re: Debian Sparc Perl problem
Apologies, client code was a bit wrong. use strict; use IO::Socket; my $ITER = 10; my $forward_socket = IO::Socket::INET->new( Proto => 'tcp', PeerAddr => "localhost", PeerPort => 12345, # Timeout => 10, ) or die $!; for (my $i = 0; $i < $ITER; $i++) { print "Sending test $i\n"; $forward_socket->print("\n"); my $resp = $forward_socket->getline or print "ERROR $!\n"; print "Received $resp\n"; }