Defect report from : Paul Eggert , UCLA
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 99 line 3090 section File Times Update objection {20051105a}
Problem:
Edition of Specification (Year): 2004
Defect code : 1. Error
POSIX requires that time-related fields "marked for update" shall be
updated when a stat(), fstat(), or lstat() is performed on the file.
However, it doesn't clearly state that the fields must be updated
_before_ these functions' effects are computed, so that these
functions get the new values. Also, POSIX doesn't mention some other
functions (e.g., fsync()) that place similar constraints on these
fields. One other problem: it requires that the fields shall be
updated even when stat() fails, but there is no way to test this.
Action:
Change XBD page 99 lines 3089-3091 (File Times Update) from:
All fields that are marked for update shall be updated when the file
ceases to be open by any process, or when a stat(), fstat(), or
lstat() is performed on the file.
to:
All fields that are marked for update shall be updated before the
file ceases to be open by any process; before a stat(), fstat(),
lstat(), fsync(), utime(), or utimes() is successfully performed on
the file; before a ftw() or nftw() invokes its user-supplied
function on behalf of the file with a flag value other than FTW_NS;
and before a sync() is successfully performed.
|