2658. [filesys.ts] [PDTS] POSIX utime() is obsolescent

Section: 15.25 [filesys.ts::fs.op.last_write_time] Status: TS Submitter: LWG/SG-3 Opened: 2014-02-13 Last modified: 2017-07-30

Priority: Not Prioritized

View all other issues in [filesys.ts::fs.op.last_write_time].

View all issues with TS status.

Discussion:

Addresses: filesys.ts

POSIX now says: "Since the utimbuf structure only contains time_t variables and is not accurate to fractions of a second, applications should use the utimensat() function instead of the obsolescent utime() function."

Suggested resolution: Rewrite the last_write_time setter description to utilize utimensat() or similar.

[20 May 2014 Beman Dawes supplies proposed wording. He comments:]

POSIX supplies two functions, futimens() and utimensat(), as replacements for utime(). futimens() is appropriate for the current TS. utimensat() will be appropriate for a future File System TS that adds the functionality of the whole family of POSIX *at() functions.

Proposed resolution:

Change 15.25 Last write time [fs.op.last_write_time]:

Effects: Sets the time of last data modification of the file resolved to by p to new_time, as if by POSIX stat() followed by POSIX utime() futimens() .