Closed
Description
dist/IO/t/io_unix.t
contains a test that creates a UNIX socket, does some tests and then attempts to unlink
the file.
That unlink
call fails and that results in a stray tmp file.
A reduced example case:
#!./perl
use IO::Socket;
my $PATH = "sock-$$";
my $listen = IO::Socket::UNIX->new(Local => $PATH, Listen => 0);
close $listen;
my @x = stat($PATH) or warn "stat $PATH failed: $!";
unlink $PATH or die "unlink $PATH failed: $!";
Running on Windows 10:
$ .\perl -I..\lib foo.t
stat sock-6816 failed: Invalid argument at foo.t line 10.
unlink sock-6816 failed: Invalid argument at foo.t line 11.
See @tonycoz comment: #20179 (comment)
I expect this needs to be fixed in the core code, at least in win32_stat() and maybe in Perl_apply() (which does unlink() amongst other ops).
I'll be looking at win32_stat() tomorrow, but being windows, I expect it to be moderately ugly (see golang/go#33357 for example).
Other references: