bug?

Goran Thyni (goran@bildbasen.kiruna.se)
Fri, 12 Apr 1996 12:42:53 +0200


This code fragment (the orig that is) works OK on linux
but fails on DG/UX 5.4r3.0 (and 2.01). 
The patch below is a quick'n'dirty fix.
Since DG/UX is based on SVr4.x perhaps this is problem
exists on other systems too.

I haven't for now given the Q about what the reason is
for this failure any deeper thought.

It can easily be tested by calling the getprint-example
in the libwww-perl README file.

-- 
---------------------------------------------------------
Gran Thyni <mailto:goran@kyla.kiruna.se> <http://kyla.kiruna.se/~goran>
#include <stddiscl.h>
Jos sepn slli mie olisin,
niin raudasta heilanin takoisin.


--------------- snip --------------------------------------------------

diff -c /is1/kyla-home/goran/perl/libwww-perl-5b11/lib/LWP/IO.pm.orig /is1/kyla-home/goran/perl/libwww-perl-5b11/lib/LWP/IO.pm
*** /is1/kyla-home/goran/perl/libwww-perl-5b11/lib/LWP/IO.pm.orig	Mon Mar 18 18:36:29 1996
--- /is1/kyla-home/goran/perl/libwww-perl-5b11/lib/LWP/IO.pm	Thu Apr 11 13:20:42 1996
***************
*** 46,53 ****
  	die "Timeout";
      } elsif ($nfound < 0) {
  	die "Select failed: $!";
!     } elsif ($err =~ /[^\0]/) {
! 	die "Exception while reading on socket handle";
      } else {
  	my $n = sysread($fd, $_[0], $size, $offset);
  	# Since so much data might pass here we cheat about debugging
--- 46,53 ----
  	die "Timeout";
      } elsif ($nfound < 0) {
  	die "Select failed: $!";
! #    } elsif ($err =~ /[^\0]/) {
! #	die "Exception while reading on socket handle";
      } else {
  	my $n = sysread($fd, $_[0], $size, $offset);
  	# Since so much data might pass here we cheat about debugging