develooper Front page | perl.perl5.porters | Postings from October 2011

Re: [perl #99704] Add symlink support for Win32

Thread Previous | Thread Next
Craig A. Berry
October 26, 2011 10:27
Re: [perl #99704] Add symlink support for Win32
Message ID:
On Wed, Oct 26, 2011 at 11:49 AM, Jan Dubois <> wrote:
> On Wed, 26 Oct 2011, Ed Avis wrote:
>> In many Windows shops it's common practice to run everything as
>> an administrator account,
> What a depressing thought.  I sure hope this isn't true anymore.
>>                           so I think it would be useful for perl
>> to support Win32 symlinks, even if it won't work when running as
>> non-admin.
> Note though that running under an administrative account is not
> enough; the perl process would also have to be run with elevated
> privileges as well.

This complicates testing as well.  There are various places in the
test suite that check for $Config{d_symlink} to know whether they can
use symlinks in testing. That would no longer be sufficient as you'd
have to know whether you're running with privileges to know whether
you can run those tests.

> The other complication is that for NTFS symlinks you need to know if
> the target is going to be a file or a directory when you create it. So
> what do you do when the target does not yet exist when symlink() is
> being called?

And yet another complication is that as far as I can tell there is no
CRT support for symlinks, so not only is there no lstat(), but none of
the usual functions that operate on files follows links.  So there
would have to be a lot of wrappers or overrides in order to provide
the functionality people normally expect from symlinks.  Not
impossible, but it seems like a better place for this support would be
in the CRT rather than in Perl.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About