IEEE Standards Interpretation for IEEE Std 1003.1™-2001 IEEE Standard Standard for Information Technology -- Portable Operating System Interface (POSIX®)
Copyright © 2006 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 #80
Topic: fork() and aio control blocks Relevant Sections: XSH fork() (rdvk#1) Page: 403 Line: 13030 Section: fork()
The spec says that no AIO request is inherited by the child after fork. It further says that after fork() and before an exec function only async-safe interfaces can be called.
Unfortunately aio_error(), aio_return(), and aio_suspend() fall into this category. It is OK to call these functions.
What isn't specified is what the state of the aio control blocks is and therefore how these functions have to behave.
One possible solution is to declare all control blocks invalid and require that EINVAL is returned. In this case add at the end of line 13030: All aio control blocks are marked invalid.
Another possibility is that all requeuests are assumed to be canceled. In this case add at the end of 13030: All outstanding AIO requests are marked as canceled.
Interpretation Response #80
The standard does not speak to this issue, and as such no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.
Rationale for Interpretation