This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: fstat st_size on open files on Parallels filesystem is wrong
- From: Jonathan Lennox <lennox at cs dot columbia dot edu>
- To: cygwin at cygwin dot com
- Date: Mon, 2 Nov 2015 08:08:23 -0500
- Subject: Re: fstat st_size on open files on Parallels filesystem is wrong
- Authentication-results: sourceware.org; auth=none
- References: <227151856 dot 20140421223417 at yandex dot ru> <21333 dot 26515 dot 393838 dot 380071 at compute01 dot cs dot columbia dot edu> <20140422081628 dot GC2339 at calimero dot vinschen dot de> <21334 dot 55207 dot 784319 dot 488271 at compute01 dot cs dot columbia dot edu> <20140423084056 dot GJ2339 at calimero dot vinschen dot de> <21335 dot 61113 dot 963950 dot 516021 at compute01 dot cs dot columbia dot edu> <20140423172413 dot GQ2339 at calimero dot vinschen dot de> <22038 dot 38637 dot 802707 dot 846218 at compute03 dot cs dot columbia dot edu> <20151021110734 dot GO5319 at calimero dot vinschen dot de> <22071 dot 12068 dot 858109 dot 210047 at compute03 dot cs dot columbia dot edu> <20151102112334 dot GC5319 at calimero dot vinschen dot de>
On Monday, November 2 2015, "Corinna Vinschen" wrote to "cygwin@cygwin.com" saying:
> On Nov 2 04:38, Jonathan Lennox wrote:
> > Unfortunately, when I do "Run As Administrator" on MinTTY, the Mac drives
> > (/cygdrive/z and /cygdrive/y) don't show up. I don't know why that is. So I
> > can't test hard links as administrator.
>
> That's a security feature of UAC. You can change that in the registry.
> As administrator:
>
> regtool -d set /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections 1
>
> Then reboot.
Didn't work:
$ ls /cygdrive/
c d e
$ regtool get /HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System/EnableLinkedConnections
$ uname -a
CYGWIN_NT-10.0 Vidyo-LT0519-10 2.3.0(0.291/5/3) 2015-11-02 11:15 x86_64 Cygwin
Is Windows 10 the same?
> I added support for this filesystem (called prlfs in mount output) and
> without hardlink support for now. I uploaded a new developer snapshot
> to https://cygwin.com/snapshots/ Please give it a try.
No, still seeing the failure in the snapshot:
$ ./stat-size-test.exe /cygdrive/y/foo ~/foo
/cygdrive/y/foo: fstat: st_size=0
/cygdrive/y/foo: stat: st_size=12
/home/jonathan/foo: fstat: st_size=12
/home/jonathan/foo: stat: st_size=12
$ uname -a
CYGWIN_NT-10.0 Vidyo-LT0519-10 2.3.0(0.291/5/3) 2015-11-02 11:15 x86_64 Cygwin
(See https://cygwin.com/ml/cygwin/2014-04/msg00488.html for the source code
to stat-size-test.c).
Oddly, though, the original problematic behavior I saw in emacs (with it
falsely detecting files as being modified externally) has gone away. Maybe
emacs added a workaround for this?
--
Jonathan Lennox
lennox@cs.columbia.edu
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple