A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Perl/perl5/issues/20204 below:

stat/unlink fails on UNIX sockets · Issue #20204 · Perl/perl5 · GitHub

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:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4