Skip Menu |
Report information
Id: 133853
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: me [at] xenu.pl
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)

Attachments
0001-win32-win32sck.c-better-socket-error-handling.patch



From: Tomasz Konojacki <me [...] xenu.pl>
Date: Tue, 19 Feb 2019 18:27:52 +0100
Subject: [PATCH] socket() sometimes does not set $! on failure on win32
To: perlbug [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
C:\Users\xenu>perl -MData::Dumper -MSocket -E "socket(my $foo, 111, SOCK_STREAM, IPPROTO_TCP) or die Dumper([$!, $^E, 0+$!, 0+$^E])" $VAR1 = [ '', '', 0, 0 ]; C:\Users\xenu>perl -MData::Dumper -MSocket -E "socket(my $foo, PF_INET, 111, IPPROTO_TCP) or die Dumper([$!, $^E, 0+$!, 0+$^E])" $VAR1 = [ '', '', 0, 0 ]; C:\Users\xenu>perl -MData::Dumper -MSocket -E "socket(my $foo, PF_INET, SOCK_STREAM, 111) or die Dumper([$!, $^E, 0+$!, 0+$^E])" $VAR1 = [ '', '', 0, 0 ]; Note that it doesn't happen when PERL_ALLOW_NON_IFS_LSP env variable is set to 1 (because it makes socket() call WSASocket() directly): C:\Users\xenu>set PERL_ALLOW_NON_IFS_LSP=1 C:\Users\xenu>perl -MData::Dumper -MSocket -E "socket(my $foo, PF_INET, SOCK_STREAM, 111) or die Dumper([$!, $^E, 0+$!, 0+$^E])" $VAR1 = [ 'The requested protocol has not been configured into the system, or no implementation for it exists.', 'The requested protocol has not been configured into the system, or no implementation for it exists', 135, 10043 ];
Date: Tue, 19 Feb 2019 18:31:21 +0100
Subject: Re: [perl #133853] [PATCH] socket() sometimes does not set $! on failure on win32
From: Tomasz Konojacki <me [...] xenu.pl>
To: perl5-porters [...] perl.org
The patch is attached

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 145b
On Tue, 19 Feb 2019 09:31:34 -0800, me@xenu.pl wrote: Show quoted text
> The patch is attached
Thanks, applied as 125ddee8ebdbac0f8fe3618e922198189bc47825. Tony
Download (untitled) / with headers
text/plain 313b
Thank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been resolved. Perl 5.30.0 may be downloaded via: https://metacpan.org/release/XSAWYERX/perl-5.30.0 If you find that the problem persists, feel free to reopen this ticket.


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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org