Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000501 [1003.1(2008)/Issue 7] System Interfaces Objection Error 2011-10-12 11:31 2019-06-10 08:55
Reporter geoffclare View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Geoff Clare
Organization The Open Group
User Reference
Section fdatasync
Page Number 815
Line Number 27225
Interp Status Approved
Final Accepted Text see Note: 0000995
Summary 0000501: fdatasync() EBADF and "open for writing"
Description Discussion on the mailing list identified an editorial mistake in
the description of the fdatasync() EBADF error: "open for writing"
should originally have been "open for reading or writing".

However, with the addition of O_EXEC and O_SEARCH this is no longer
an editorial matter, as the group needs to decide whether to require,
allow, or disallow EBADF for file descriptors opened with O_EXEC or
O_SEARCH.

Currently the fsync() EBADF just says "The fildes argument is not a
valid descriptor", so the proposed change makes fdatasync() the
same for consistency.

Alternatively, if it is felt that implementors should be given the
option of returning an EBADF error for file descriptors opened with
O_EXEC or O_SEARCH, then as well as the proposed change a "may fail"
EBADF error should be added to both pages which says "The fildes
argument is not a valid file descriptor open for reading or writing".
Desired Action Change:

    The fildes argument is not a valid file descriptor open for writing.

to:

    The fildes argument is not a valid file descriptor.
Tags tc2-2008
Attached Files

- Relationships
related to 0000671Closedajosey aio_fsync() EBADF and "open for writing" 

-  Notes
(0000994)
eblake (manager)
2011-10-20 15:49

In addition to the Desired Action, also make these changes:

At line 27232 (APPLICATION USAGE), change "None." to:

Note that even if the file descriptor is not open for writing, if there are
any pending write requests on the underlying file, then that I/O will be
completed prior to the return of fdatasync( ).
(0000995)
eblake (manager)
2011-10-20 15:52

Interpretation response
------------------------
The standard states that fdatasync() shall fail on a read-only file
descriptor, and conforming implementations must conform to this. However,
concerns have been raised about this which are being referred to the
sponsor.

Rationale:
-------------
The access mode of the file descriptor does not affect whether there
are pending I/O operations on the underlying file.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the changes in the Desired Action and Note: 0000994
(0001296)
ajosey (manager)
2012-06-29 16:18

Interpretation proposed 29 June 2012 for final 45 day review
(0001337)
ajosey (manager)
2012-08-30 09:10

Interpretation approved 30 Aug 2012
(0001496)
xroche (reporter)
2013-03-19 15:17

aio_fsync has the same issue regarding EBADF and "must be opened for writing" (a requirement which has been enforced in the glibc implementation, for example, causing the function to be unusable for directory file descriptors, for example)

- Issue History
Date Modified Username Field Change
2011-10-12 11:31 geoffclare New Issue
2011-10-12 11:31 geoffclare Status New => Under Review
2011-10-12 11:31 geoffclare Assigned To => ajosey
2011-10-12 11:31 geoffclare Name => Geoff Clare
2011-10-12 11:31 geoffclare Organization => The Open Group
2011-10-12 11:31 geoffclare Section => fdatasync
2011-10-12 11:31 geoffclare Page Number => 815
2011-10-12 11:31 geoffclare Line Number => 27225
2011-10-12 11:31 geoffclare Interp Status => ---
2011-10-20 15:49 eblake Note Added: 0000994
2011-10-20 15:52 eblake Note Added: 0000995
2011-10-20 15:52 eblake Tag Attached: tc2-2008
2011-10-20 15:53 eblake Final Accepted Text => see Note: 0000995
2011-10-20 15:53 eblake Status Under Review => Interpretation Required
2011-10-20 15:53 eblake Resolution Open => Accepted As Marked
2011-10-20 15:53 eblake Desired Action Updated
2011-10-20 15:53 eblake Interp Status --- => Pending
2012-06-29 16:18 ajosey Interp Status Pending => Proposed
2012-06-29 16:18 ajosey Note Added: 0001296
2012-08-30 09:10 ajosey Interp Status Proposed => Approved
2012-08-30 09:10 ajosey Note Added: 0001337
2013-03-19 15:17 xroche Note Added: 0001496
2013-03-19 15:39 nick Issue cloned 0000671
2013-03-19 15:39 nick Relationship added related to 0000671
2019-06-10 08:55 agadmin Status Interpretation Required => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker