Email List: Xaustin-group-lX
[All Lists]

[1003.1(2008)/Issue 7 0000078]: grouping of creation/other O_* flags

To: austin-group-l@xxxxxxxxxxxxx
Subject: [1003.1(2008)/Issue 7 0000078]: grouping of creation/other O_* flags
From: Austin Group Bug Tracker <noreply@xxxxxxxxxxxxx>
Date: Mon, 29 Jun 2009 08:53:34 +0000
Keywords: [1003.1(2008)/Issue 7] Base Definitions and Headers
The following issue has been RESOLVED. 
====================================================================== 
http://austingroupbugs.net/view.php?id=78 
====================================================================== 
Reported By:                geoffclare
Assigned To:                ajosey
====================================================================== 
Project:                    1003.1(2008)/Issue 7
Issue ID:                   78
Category:                   Base Definitions and Headers
Type:                       Error
Severity:                   Objection
Priority:                   normal
Status:                     Resolved
Name:                       Geoff Clare 
Organization:               The Open Group 
User Reference:              
Section:                    fcntl.h 
Page Number:                240 
Line Number:                7874-7879 
Final Accepted Text:         
Resolution:                 Accepted
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-06-29 08:47 UTC
Last Modified:              2009-06-29 08:53 UTC
====================================================================== 
Summary:                    grouping of creation/other O_* flags
Description: 
 OBJECTION                                        Enhancement Request
Number 1
 gwc:xxxxxxxxxxxxx                           Bug in XBDd5.1 fcntl.h (rdvk#
 1)
 [gwc mtk fcntl]                               Thu, 16 Oct 2008 17:37:35
+0100

_____________________________________________________________________________

 The <fcntl.h> spec describes various groups of flags for open() and
 openat().  Among them, the file creation flags at lines 7826 to 7834:

 ===
 The <fcntl.h> header shall define the following symbolic constants as
 file creation flags for use
 in the oflag value to open() and openat(). The values shall be
 bitwise-distinct and shall be
 suitable for use in #if preprocessing directives.
 O_CREAT Create file if it does not exist.
 O_EXCL Exclusive use flag.
 O_NOCTTY Do not assign controlling terminal.
 O_TRUNC Truncate flag.
 O_TTY_INIT Set the termios structure terminal parameters to
 conforming behavior; see Section 11.2 (on page 205).
 ===

 Further down, AT LINES 7874 TO 7879, there is the following text
 describing "other" FLAGS:

 ===
 The <fcntl.h> header shall define the following symbolic constants as
 values for the flag used by
 open( ) and openat( ):
 O_CLOEXEC The FD_CLOEXEC flag associated with the new descriptor shall
 be set to close
 the file descriptor upon execution of an exec family function.
 O_DIRECTORY Fail if not a directory.
 O_NOFOLLOW Do not follow symbolic links.
 ===

 There are two problems I see here:

 a) The wording in the second passage is inconsistent with that in the
 first passage.  It should make clear that those flags are to be
 inclusively ORed in 'oflag'.

 b) The other point, which is what led me to raise this report, is that
 the spec is unclear on what the real difference is between these two
 groups of flags.  Should they not all in fact be considered as one
 group.  (For example, it's hard for me to understand why O_DIRECTORY
 is in one group, while say O_EXCL is in the other.)

Desired Action: 
 Delete lines 7874 to 7875.

 Relocate the flags described in the list at lines 7876 to 7879
(O_CLOEXEC,
 O_DIRECTORY and O_NOFOLLOW) into the list at lines 7829 to 7834 (O_CREAT
 through O_TTY_INIT).
======================================================================

<Prev in Thread] Current Thread [Next in Thread>