From: Jarkko Hietaniemi Date: Thu, 28 Mar 2002 02:00:29 +0000 (+0000) Subject: socketpair binmode :bytes. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b018c34d003835b4efd8ed9f28ccc297d56b7ca7;p=p5sagit%2Fp5-mst-13.2.git socketpair binmode :bytes. p4raw-id: //depot/perl@15570 --- diff --git a/ext/Socket/socketpair.t b/ext/Socket/socketpair.t index 937ffa5..d70f164 100644 --- a/ext/Socket/socketpair.t +++ b/ext/Socket/socketpair.t @@ -76,6 +76,9 @@ ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_STREAM, PF_UNSPEC), "socketpair (LEFT, RIGHT, AF_UNIX, SOCK_STREAM, PF_UNSPEC)") or print "# \$\! = $!\n"; +binmode(LEFT, ":bytes"); +binmode(RIGHT, ":bytes"); + my @left = ("hello ", "world\n"); my @right = ("perl ", "rules!"); # Not like I'm trying to bias any survey here. @@ -162,6 +165,9 @@ ok (socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC), "socketpair (LEFT, RIGHT, AF_UNIX, SOCK_DGRAM, PF_UNSPEC)") or print "# \$\! = $!\n"; +binmode(LEFT, ":bytes"); +binmode(RIGHT, ":bytes"); + foreach (@left) { # is (syswrite (LEFT, $_), length $_, "write " . _qq ($_) . " to left"); is (syswrite (LEFT, $_), length $_, "syswrite to left");