Skip Menu |
 

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 76324
Status: resolved
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: LCONS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: link() does nor return the correct error on existing files
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 488
Download (untitled) / with headers
text/plain 488b
When using the link() built-in to link to an existing file, the function fails and sets $! to EINVAL. On other systems, EEXIST is used. This seems to violate the POSIX standard (http://pubs.opengroup.org/onlinepubs/009695399/functions/link.html) that does not even list EINVAL in its list of possible errors. Note that, in this case, $^E is set to ERROR_ALREADY_EXISTS (Cannot create a file when that file already exists) so the problem may simply bet a mapping between $^E and $!.
From kmx [...] volny.cz Thu Apr 5 07: 29:05 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-2.185 tagged_above=-99.9 required=10 tests=[AWL=-0.285, BAYES_00=-1.9] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-2606-1333624314-947.76324-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-76324 [...] rt.cpan.org> <rt-3.8.HEAD-2606-1333624314-947.76324-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4F7D81F5.1030701 [...] volny.cz>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -2.185
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 06EC32401B3 for <cpan-bug+Perl-Dist-Strawberry [...] hipster.bestpractical.com>; Thu, 5 Apr 2012 07:29:05 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JlNZEiWZLMQY for <cpan-bug+Perl-Dist-Strawberry [...] hipster.bestpractical.com>; Thu, 5 Apr 2012 07:29:03 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C31B4240082 for <bug-Perl-Dist-Strawberry [...] rt.cpan.org>; Thu, 5 Apr 2012 07:29:02 -0400 (EDT)
Received: (qmail 31495 invoked by uid 103); 5 Apr 2012 11:29:02 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 5 Apr 2012 11:29:02 -0000
Received: from smtp.volny.cz (HELO smtp.volny.cz) (62.44.29.27) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Thu, 05 Apr 2012 04:28:57 -0700
Received: from [193.84.252.215] (asuka.dcit.cz [193.84.252.215]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.volny.cz (Postfix) with ESMTP id 7F64AC0251 for <bug-Perl-Dist-Strawberry [...] rt.cpan.org>; Thu, 5 Apr 2012 13:28:54 +0200 (CEST)
Delivered-To: cpan-bug+Perl-Dist-Strawberry [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
Subject: Re: [rt.cpan.org #76324] link() does nor return the correct error on existing files
Return-Path: <kmx [...] volny.cz>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Perl-Dist-Strawberry [...] hipster.bestpractical.com
X-RT-Mail-Extension: perl-dist-strawberry
Date: Thu, 05 Apr 2012 13:28:53 +0200
X-Spam-Level:
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: kmx <kmx [...] volny.cz>
RT-Message-ID: <rt-3.8.HEAD-2610-1333625345-957.76324-0-0 [...] rt.cpan.org>
Content-Length: 778
Download (untitled) / with headers
text/plain 778b
Show quoted text
> When using the link() built-in to link to an existing file, the function > fails and sets $! to EINVAL. On other systems, EEXIST is used. > > This seems to violate the POSIX standard > (http://pubs.opengroup.org/onlinepubs/009695399/functions/link.html) that > does not even list EINVAL in its list of possible errors. > > Note that, in this case, $^E is set to ERROR_ALREADY_EXISTS (Cannot > create a file when that file already exists) so the problem may simply > bet a mapping between $^E and $!. >
Thanks for your report. However this seems to be an issue related rather to perl core (Win32 part) than to strawberry perl. Perhaps https://rt.perl.org/ is a better place for this sort of bug. Anyway I can reproduce your example on strawberry perl 5.14.2 -- kmx
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2610-1333625345-957.76324-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-76324 [...] rt.cpan.org> <rt-3.8.HEAD-2606-1333624314-947.76324-4-0 [...] rt.cpan.org> <4F7D81F5.1030701 [...] volny.cz> <rt-3.8.HEAD-2610-1333625345-957.76324-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2608-1333627443-329.76324-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 228
Download (untitled) / with headers
text/plain 228b
On Thu Apr 05 07:29:05 2012, kmx@volny.cz wrote: Show quoted text
> Perhaps https://rt.perl.org/ is a better place for this sort of bug.
Thanks for your reply. I've submitted the bug as: https://rt.perl.org/rt3/Public/Bug/Display.html?id=112272
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2608-1333627443-329.76324-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-76324 [...] rt.cpan.org> <rt-3.8.HEAD-2606-1333624314-947.76324-4-0 [...] rt.cpan.org> <4F7D81F5.1030701 [...] volny.cz> <rt-3.8.HEAD-2610-1333625345-957.76324-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-2608-1333627443-329.76324-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-4152-1338210079-1527.76324-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 301
Download (untitled) / with headers
text/plain 301b
On Thu Apr 05 08:04:03 2012, LCONS wrote: Show quoted text
> On Thu Apr 05 07:29:05 2012, kmx@volny.cz wrote:
> > Perhaps https://rt.perl.org/ is a better place for this sort of bug.
> > Thanks for your reply. I've submitted the bug as: > https://rt.perl.org/rt3/Public/Bug/Display.html?id=112272
Fixed now in blead.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.