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
0000137 [1003.1(2004)/Issue 6] System Interfaces Comment Clarification Requested 2009-08-25 15:08 2013-04-16 13:06
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 PR2549
Section tempnam
Page Number 1532
Line Number 47701
Interp Status Approved
Final Accepted Text Note: 0000207
Summary 0000137: Can tempnam() use more than one i-d directory?
Description The description of tempnam() states:

    "If dir is a null pointer or points to a string which is not a
    name for an appropriate directory, the path prefix defined as
    P_tmpdir in the <stdio.h> header shall be used. If that directory
    is not accessible, an implementation-defined directory may be used."

The way this is worded carries an implication (although not a strong
one) that there can only be one such implementation-defined directory.
However, it seems likely that this was accidental rather than a
deliberate intention to restrict tempnam() to one i-d directory.

Some implementations try more than one additional directory if
P_tmpdir is not accessible. This seems like a useful feature, and
the wording should be clarified to explicitly allow it.
Desired Action Change "an implementation-defined directory"
to "one or more implementation-defined directories"

(Note that in XSH7 this text is at page 2102 line 66520.)
Tags tc1-2008
Attached Files

- Relationships

-  Notes
(0000207)
nick (manager)
2009-08-27 16:01
edited on: 2009-10-12 06:14

Interpretation response
------------------------
The standard clearly state that this is implementation defined and conforming implementations must conform to this.

Rationale:
---------
"Implementation defined" permits the implementation to use any appropriate means to select an alternative directory, including selecting one entry from a list.

The standards developers do not see any need to change the current wording; indeed, the proposed change suggests that an implementation might want to use multiple directories at the same time, which is not the intent. The implementation may pick one of a potentially infinite set of accessible directories.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------

Add mkdtemp() and mkstemp() to the See Also list.
In the example (issue 7 lines 66534-66535) make the "directory" and "fileprefix" variables const.

   const char *directory = "/tmp";
   const char *fileprefix = "file";



- Issue History
Date Modified Username Field Change
2009-08-25 15:08 geoffclare New Issue
2009-08-25 15:08 geoffclare Status New => Under Review
2009-08-25 15:08 geoffclare Assigned To => ajosey
2009-08-25 15:08 geoffclare Name => Geoff Clare
2009-08-25 15:08 geoffclare Organization => The Open Group
2009-08-25 15:08 geoffclare User Reference => PR2549
2009-08-25 15:08 geoffclare Section => tempnam
2009-08-25 15:08 geoffclare Page Number => 1532
2009-08-25 15:08 geoffclare Line Number => 47701
2009-08-27 16:01 nick Note Added: 0000207
2009-08-27 16:02 nick Interp Status => ---
2009-08-27 16:02 nick Final Accepted Text => Note: 0000207
2009-08-27 16:02 nick Status Under Review => Interpretation Required
2009-08-27 16:02 nick Resolution Open => Accepted As Marked
2009-08-27 16:06 nick Note Edited: 0000207
2009-08-27 16:08 nick Note Edited: 0000207
2009-08-27 16:12 nick Interp Status --- => Pending
2009-10-12 06:14 ajosey Note Edited: 0000207
2009-10-12 06:14 ajosey Interp Status Pending => Approved
2010-09-03 20:37 Don Cragun Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Interpretation Required => Closed


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