bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: utimes() vs. close()


From: Paul Eggert
Subject: Re: utimes() vs. close()
Date: Wed, 19 Oct 2005 12:45:53 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Eric Blake) writes:

> I was unable to determine from POSIX if this behavior is permissable
> (close changing the timestamps of an open file descriptor

There wouldn't be much point to futimes() if the behavior were permitted.

POSIX is pretty careful in specifying when st_atime, st_mtime, and
st_ctime can be changed (see, e.g., readdir()).  POSIX doesn't grant
permission for close() to change these times, so close() shouldn't
change the times.  This is independent of whether utimes() was called.

Other programs depend on close() not modifying the times.  E.g., FreeBSD cp
<http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/cp/utils.c?rev=1.46>.

> Any thoughts?

I'd say it's a Cygwin bug.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]