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 #5
Topic: root directory Relevant Sections: 220.127.116.11, 18.104.22.168, B.2.3.7 Classification: Editorial defect
In 22.214.171.124 root directory [General Terms], page 19, line 341:
"root directory: A directory, associated with a process ..."
In 126.96.36.199 Description [Process Creation], page 42, lines 33-36:
"All other process characteristics defined by this part of ISO/IEC 9945 shall be the same in the parent and child processes. The inheritance of process characteristics not defined in this part of ISO/IEC 994 is unspecified by this part of ISO/IEC 9945, but should be specified in the system documentation."
In B.2.3.7 pathname resolution [General Concepts], page 211,
"The initialization of the root directory of a process is implementation defined."
According to the normative text, however, either the root directory is inherited on fork(), or it is unspecified. It is certainly not implementation defined. Since the definition of "root directory" identifies it as associated with a process, it seems as though inheritance is specified. Is the rationale in error? Does "initialization" refer to something other than "inheritance"?
The rationale is in error.
Rationale for Interpretation
The standard requires the root directory to be inherited in the child process after a call to fork. An application cannot make any assumption about its root directory on invocation (nor can a user upon login). In particular it is not safe to assume that all processes have the same root.