delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/02/15:05:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4ED92F64.4060905@redhat.com>
Date: Fri, 02 Dec 2011 13:04:52 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Redirecting output from running proc doesn't modify the "last modified time" field for target file
References: <32903475 DOT post AT talk DOT nabble DOT com> <CAG_2cTn_1UHZy-13ACu-EPMaUSSSOr38s1_Rc0ccmdS2JDyJSQ AT mail DOT gmail DOT com> <32904332 DOT post AT talk DOT nabble DOT com> <CAG_2cTm+VQcNuRmDTFEheEyuOAeWA4tCW5+whH74E6D4UkAFAg AT mail DOT gmail DOT com>
In-Reply-To: <CAG_2cTm+VQcNuRmDTFEheEyuOAeWA4tCW5+whH74E6D4UkAFAg@mail.gmail.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
X-IsSubscribed: yes
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

--------------enig01E0566B04D060AFCF4B9377
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 12/02/2011 11:50 AM, Jon Clugston wrote:
> While this loop is running, the timestamp on "x.log" doesn't change
> (whereas on Linux it changes every 10 seconds).  It sure looks to me
> that Windows just doesn't bother updating the file timestamp while it
> is open.  I don't know if this update is required by POSIX - I would
> doubt that it is.

POSIX requires that any write() to an open file mark it for update; the
update doesn't have to occur right away (so you can batch up several
writes, but only change the mtime metadata once at the end of the
batch), but it DOES require that stat() and several similar functions
flush all marked updates prior to exposing timestamps to the user.  So
yes, Windows is violating POSIX, and I have no idea whether cygwin can
work around it.

--=20
Eric Blake   eblake AT redhat DOT com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig01E0566B04D060AFCF4B9377
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO2S9kAAoJEKeha0olJ0NqGBoIAIn7dExZlPahR+ttA05xUs46
alxMYFE50XXpxjoXSFWQnM/gv9GW6aAiUpb6/XT5TMXsaDAyAfOX/qM7eeS2Oon/
7X2DA9kjvTxqq3vcxCpTDAm9Vs1bLVYmlQFcKgBeQJSQA/sp3kLMdyEqYry+zTVZ
EE7zdh5fh/pNzIF6bWsRrg0wa6aFF3jb2/+DOistSMeE/gPkOsdi66ypfbEPyizL
cw0sy4PdY9aMinF3/rQx9jii/NxMk4/ucuM8OPgHcdRM32erjpL8ULATdkXYhEYL
GfwkhZ9080attd589vFO+TJXm37f87F/+qX7Y76GiIjAjX7LSSBfRx+4mIEzhjo=
=5JLe
-----END PGP SIGNATURE-----

--------------enig01E0566B04D060AFCF4B9377--

- Raw text -


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