Use of the information contained in this unapproved document is at your own risk
.Last update: 10 April,2001
1003.1-90 #59
Classification: No Change.
This response will be incorporated in an IEEE interpretations
publication, and will be also made available on-line on the IEEE
SPAsystem.
There are some proposed changes arising for POSIX 2003.1 (test methods)
which are appended at the end of this text. These should be forwarded
to the test methods working group and/or project editor.
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: unlink() vs remove()
Relevant Sections: 5.5
Interpretation Request: (Defect Report)
-----------------------
Does POSIX.1-1990 require that the ANSI C remove()
function be effective when the filename argument
is not a regular file? The question arises
because several filename resolution assertions in
2003.1-1992 can be tested only if remove() is
effective when filename is a directory.
My reading is that neither POSIX.1-1990 nor ANSI C
makes any specific requirements. The rationale
for remove() in ANSI C notes that remove is
intended to be a portable replacement for the UNIX
(now POSIX.1, too) unlink() function. A
conforming implementation might implement remove()
as a simple call to unlink(). However, I think
that an implementation of remove() that fails when
the argument is not the name of a regular file is
also conforming.
IEEE Interpretation for 1003.1-1990 (9945-1:1990):
--------------------------------------------------
The behavior for file types other than regular files is unspecified.
Rationale for Interpretation:
-----------------------------
There is no requirement in POSIX.1-1990 for remove() to succeed
on file types other than regular file.
Editorial note for 2003.1 Project editor
----------------------------------------
The proposed changes to IEEE Std 2003.1-1992 are as follows:
Changes to remove() assertions 9 and 10, (8.1.33.4, lines 2047 and 2050)
Replace "(A)" with "(C) If remove() supports directory file types:"
_____________________________________________________________________________