delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/21/14:35:30

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=jJyQ9VNuAk4KWltE
aXDxxmsVjlzKTAudm+avVCvCrD99g1q8uDQFeuPXdKi5mn0FoQgSkPAuuye1vjxp
OFDoBLxefoDuhrXzkf4KyFfeGpzXdMfcS8MG19f66OgK9Al9XxmN4htXLAIeMYce
ffQHzDelaSyNcBTbmAtscGGZb70=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=ikyqm9QArO5SCcFqokyMv3
04wZE=; b=Yr3yY4pIdWdXgQ28HsrjqAvkdW/XFc5nIrXdpu//1FoCcw055gAWW9
X+7MKRjsuY7g5UKK79ZI97DIdpeMM80cidTQmG/gTX+/Un5Pebfc65bgXdU9joYD
9yiIFIZ9s/5LFsVZhZF8zj6cYrHB1qL07w6Af/yrulYNftIDbc2H0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,SPF_SOFTFAIL autolearn=no version=3.3.2
X-HELO: smtpback.ht-systems.ru
Date: Mon, 21 Apr 2014 22:34:17 +0400
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <227151856.20140421223417@yandex.ru>
To: lennox AT cs DOT columbia DOT edu, cygwin AT cygwin DOT com
Subject: Re: fstat st_size on open files on Parallels filesystem is wrong
In-Reply-To: <21333.25325.11106.958642@compute01.cs.columbia.edu>
References: <21333 DOT 25325 DOT 11106 DOT 958642 AT compute01 DOT cs DOT columbia DOT edu>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id s3LIZOjM030686

Greetings, lennox AT cs DOT columbia DOT edu!

> I’m running cygwin64 1.7.29 in a Windows 8.1 Pro virtual machine, running in
> Parallels Desktop 9.0.24229 on Mac OS X 10.9.2.

> Parallels Desktop automatically mounts my Mac OS X home directory as a Z:
> drive in Windows.  Cygwin mount reports this drive as being type "prlsf".

> Unfortunately, I've discovered that if I have an open file on this
> filesystem which has been written to, the size returned by Cygwin fstat() on
> the open file is wrong.  A stat() of the file after it's been closed is
> correct.

> This has the consequence that emacs always thinks saved files have been
> modified externally, since emacs looks at files' sizes (as well as their
> modification times) to detect external changes.  This makes emacs
> near-unusable.

> This problem does not occur for files in my Cygwin home directory, or other
> locations mounted on my Windows C: drive.

> I've attached a simple unit test program that illustrates the problem.
> I've also attached my cygcheck -s -v -r output.

> Any ideas?  Is this a Cygwin bug, a Parallels bug, or something else?
> Glancing over the Cygwin code, I see that there are a few cases where fstat
> has special cases for certain filesystem types.

You never flushing the buffer in your test code, or I'm reading it wrong?


--
WBR,
Andrey Repin (anrdaemon AT yandex DOT ru) 21.04.2014, <22:33>

Sorry for my terrible english...

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019