Skip Menu |

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 61074
Status: resolved
Priority: 0/
Queue: IO

Owner: Nobody in particular
Requestors: deathwolf+bitcard [...]

Bug Information
Severity: Normal
Broken in: 1.25
Fixed in: (no value)

Subject: IO::Handle::blocking does not work under windows 7 64bit
Download (untitled) / with headers
text/plain 592b
IO::Handle::blocking seems to break the socket entity under windows 7 64bit(possible other OS'es). Attached is an example of breaking code: please adjust the port and address to something that is open on your side, and then try uncommenting either of the IO::Handle::blocking calls. The connect will fail with "unknown error" or "A non-blocking socket operation could not be completed immediately." depending on the perl distribution. Please note that $sock->blocking(0) or $sock->blocking(1) will also fail the same way. Issue present in both activeperl 5.10.1 and strawberry perl 5.12.1.
text/x-perl 320b
#!/usr/bin/perl use strict; use warnings; use Socket; use IO::Handle; my $sock; socket($sock, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || die "socket: $!"; IO::Handle::blocking($sock, 1); #IO::Handle::blocking($sock, 0); connect($sock, sockaddr_in(3333, inet_aton("localhost"))) || die "connect: $!";
From: deathwolf+bitcard [...]
Download (untitled) / with headers
text/plain 118b
Additional bug reference for a similar bug that might be related:
Ticket migrated to github as

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to