Answering questions that may arise related to the meaning of portions of an IEEE standard concerning specific applications.

IEEE Standards Interpretation for IEEE Std 1003.1™-1990 IEEE Standard for Information Technology--Portable Operating System Interfaces (POSIX®)

Copyright © 2001 by the Institute of Electrical and Electronics Engineers, Inc. 3 Park Avenue New York, New York 10016-5997 USA All Rights Reserved.

Interpretations are issued to explain and clarify the intent of a standard and do not constitute an alteration to the original standard. In addition, interpretations are not intended to supply consulting information. Permission is hereby granted to download and print one copy of this document. Individuals seeking permission to reproduce and/or distribute this document in its entirety or portions of this document must contact the IEEE Standards Department for the appropriate license. Use of the information contained in this document is at your own risk.

IEEE Standards Department Copyrights and Permissions 445 Hoes Lane, Piscataway, New Jersey 08855-1331, USA

Interpretation Request #13
Topic: rmdir and . or .. Relevant Sections:,

In Description [Directory Operations], page 84, line 44:
"It is unspecified whether entries are returned for dot or dot-dot."

In Description [Remove a Directory], page 98, lines 517-520:
"If one or more processes have the directory open when the last link is removed, the dot and dot-dot entries, if present, are removed before rmdir() returns and no new entries may be created in the directory, but the directory is not removed until all references to the directory have been closed."

What is the effect of removing the dot and dot-dot entries? May a conforming implementation return entries for dot or dot-dot with the readdir() function after these entries have been removed by the rmdir() function?

Interpretation Response
Whether or not the entries for dot and dot-dot are returned by a call to readdir() is unspecified. After the removal of the dot and dot-dot the return of these entries by readdir() is still unspecified. However, the observed behaviour in these two instances may differ on an implementation.

Rationale for Interpretation
A conforming application should not depend on the presence or absence of the dot and dot-dot entries being returned by readdir().