develooper Front page | perl.perl5.porters | Postings from December 2015

Re: Cygwin cygdrive prefix

Thread Previous | Thread Next
From:
bulk88
Date:
December 4, 2015 20:02
Subject:
Re: Cygwin cygdrive prefix
Message ID:
20151204200157.13573.qmail@lists-nntp.develooper.com
Achim Gratz wrote:
> Tony Cook writes:
>>    1.15          cygwin build issue, test failure
>
> Sorry to piggy-back on here, but I didn't find where this was discussed
> on the list (if it was).
>
>  From the date of the commit I assume that 636efde is (at least in part)
> what's meant here.  I suggest that the fix should be cherry-picked to
> the 5.22.1 branch.
>
> To the fix itself, using df will eventually fail on some systems even
> with the "-a" switch since you can't assume that a C: drive exists.  A
> more appropriate way to obtain the cygdrive prefix is to use
>
> readlink "/proc/cygdrive"
>
> or `readlink -f /proc/cygdrive` or maybe even `cygpath -u C:` (the
> latter works even if the drive in question doesn't exist and presumably
> does so even on older versions of Cygwin that didn't have the /proc
> pseudo-fs).

Shellling out is evil perf wise, cyg perl really needs to learn how to 
use cyg specific XS or C funcs.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About