IEEE Std 1003.1-2001 Interpretation #5

Copyright © 2006 IEEE. All rights reserved.

Defect Report concerning (number and title of International Standard
    or DIS final text, if applicable): 
	Interpretation Number: 5
	Topic:			Defect in XSH unlink
	Relevant Sections:	unlink
------------------------------------------------------------------------ 
 7  Defect Report concerning (number and title of International Standard
    or DIS final text, if applicable): 
The System Interfaces Volume of IEEE Std 1003.1-2001
------------------------------------------------------------------------ 
 8  Qualifier (e.g. error, omission, clarification required):
3. Clarification required
------------------------------------------------------------------------ 
 9  References in document (e.g. page, clause, figure, and/or table
    numbers):
 Page: 1555  Line: 47966  Section: unlink
XSH Enhancement Request Number 58
------------------------------------------------------------------------ 
10  Nature of defect (complete, concise explanation of the perceived
    problem):
 The unlink() function defines the following error condition
 [EPERM] The file named by path is a directory, and either the calling
 process does not have appropriate privileges, or the implementation
 prohibits using unlink() on directories.
 The EISDIR error condition would also seem an appropriate error to
 return in the case when unlink() is attempted on a directory.
 Is an implementation conforming that returns EISDIR rather
 than EPERM ?
 A certain body of implementors believe that this is the more natural
 error code to expect in this case.
------------------------------------------------------------------------ 
11  Solution proposed by the submitter (optional):
 Proposed interpretation:
 The standard is clear on the requirements, however concerns should be
 forwarded to the sponsor to consider allowing the EISDIR error.
 Proposed rationale:
 Applications receiving an error should be able to cope with any
 unexpected error code. The EISDIR code would seem a logical return.
------------------------------------------------------------------------ 
Interpretation response
------------------------
The standard clearly states that unlink() on a directory returns
EPERM for this condition,and conforming implementations must conform
to this.
Rationale:
-------------
The standard is clear. Only EPERM is defined for this error.
To make a change would reduce the consensus.
 _____________________________________________________________________________

Back to IEEE Standards Interpretations for IEEE Std 1003.1-2001