Return to the FIPS
Home Page
FIPS PUB 151-2
Supersedes FIPS PUB 151-1
1990 March 28
Federal Information
Processing Standards Publication 151-2
May 12, 1993
Announcing the Standard for
Portable Operating System Interface (POSIX) -
System Application Program Interface [C Language]
Federal Information Processing Standards Publications (FIPS PUBS)
are issued by the National Institute of Standards and Technology after
approval by the Secretary of Commerce pursuant to Section 111(d) of the
Federal Property and Administrative Services Act of 1949, as amended by the
Computer Security Act of 1987, Public Law 100-235.
1. Name of Standard. Portable Operating System Interface (POSIX)
- System Application Program Interface [C Language] (FIPS PUB
151-2).
2. Category of Standard. Software Standard, Operating Systems.
3. Explanation. This publication announces the adoption of
International Standard ISO/IEC 9945-1:1990, Information Technology
- Portable Operating System Interface (POSIX) - Part 1: System
Application Program Interface (API) [C Language], as a Federal
Information Processing Standard. This standard defines a C
programming language source interface to an operating system
environment. This standard is for use by computing professionals
involved in system and application software development and
implementation. This revision supersedes FIPS PUB 151-1 in its
entirety.
4. Approving Authority. Secretary of Commerce.
5. Maintenance Agency. U.S. Department of Commerce, National
Institute of Standards and Technology (Computer Systems
Laboratory).
6. Cross Index. International Standard ISO/IEC 9945-1:1990,
Information Technology - Portable Operating System Interface
(POSIX) - Part 1: System Application Program Interface (API) [C
Language].
7. Related Documents.
a. Federal Information Resources Management Regulations
subpart 201-20.303, Standards, and subpart 201-39.1002, Federal
Standards.
b. Federal Information Processing Standards Publication 160,
C.
c. ISO/IEC 9899: Information Technology-Programming
Languages- C.
d. Test Methods for Measuring Conformance to POSIX, IEEE
Std 1003.3-1991.
e. Test Methods for Measuring Conformance to POSIX.1, IEEE
Std 2003.1-1992.
f. Interpretation Procedures for Federal Information
Processing Standards for Software, FIPS PUB 29-3, 1992 October 29.
g. NVLAP Program Handbook, Computer Applications Testing
POSIX Conformance Testing, NISTIR 4522, March 1991 (latest
revision).
h. NIST POSIX Testing Policy - General Information, April 15,
1993.
i. NIST POSIX Testing Policy, Certificate of Validation
Requirements, FIPS 151-2, April 15, 1993.
8. Related On-Line Information. Information on the NIST POSIX
Testing Program is available on an electronic mail (e-mail) file
server system. Documents available are:
- register - a register of accredited laboratories and tested
implementations
- policy - general information on NIST POSIX testing policy
- required - information on requirements for certificates of
validation under NIST POSIX testing policy for FIPS 151
To access the system:
- You must be able to send and receive e-mail via the Internet.
For most e-mail systems, send a message to posix@nist.gov.
When the e-mail system responds with "Subject," you may type
anything. The next line should be a basic command for the
e-mail server to send you one or more of the documents listed
above. For example, to receive a copy of the register file,
enter: send register.
- After you issue your send command and a carriage return, the
next line should signal the end of the e-mail message as
required by your e-mail system.
- Your e-mail system may respond with EOT for the end of
transmission.
The mail server program reads the message and sends the requested
document to the requester's e-mail address.
If you need help contact the Systems and Software Technology
Division, B266 Technology Building, NIST, Gaithersburg, MD 20899,
telephone: 301-975-3295.
9. Objectives. The primary objectives of this FIPS are:
a. To promote portability of useful computer application
programs at the source code level.
b. To simplify computer program documentation by the use of
a standard portable system interface design.
c. To reduce staff hours in porting computer programs to
different vendor systems and architectures.
d. To increase portability of acquired skills, resulting in
reduced personnel training costs.
e. To maximize the return on investment in generating or
purchasing computer programs by insuring operating system
compatibility.
10. Applicability. This FIPS shall be used for new operating
systems that are either developed or acquired for Government use
where POSIX-like interfaces are required. This FIPS is applicable
to the entire range of computer hardware, including:
a. laptops,
b. micro-computer systems,
c. mini-computer systems,
d. engineering workstations, and
e. mainframes.
11. Conformance. Implementations claiming conformance to FIPS
151-2 must successfully comply with the current testing
requirements as defined in the "NIST POSIX Testing Policy -
Certificate of Validation Requirements - FIPS 151-2".
12. Specifications. The FIPS PUB 151-2 specifications are the
specifications contained in the International Standard ISO/IEC
9945-1:1990, Information Technology - Portable Operating System
Interface (POSIX) - Part 1: System Application Program Interface
(API) [C Language], with the modifications specified below. These
modifications are required for implementations of POSIX.1 that are
acquired by Federal agencies.
These modifications ensure that applications, which choose to use
those optional features specified in POSIX.1 and mandated below,
are strictly conforming FIPS 151-2 applications (portable to all
conforming FIPS 151-2 implementations). For each modification a
reference to the associated POSIX text is provided.
a. Implementations claiming conformance to FIPS 151-2 shall
provide the functionality specified in FIPS 160 and provide C
Standard Language-Dependent System Support. (The reference text
for FIPS 160 is ISO/IEC 9899: Information Technology-Programming
Languages-C) [See POSIX.1 Subclause 1.3.3-1.3.3.3 lines 143-188].
b. Implementations claiming conformance to FIPS 151-2 shall
define the POSIX.1 environment variable, HOME, in the environment
for the login shell. [See POSIX.1 Subclause 2.6 lines 698-699].
c. Implementations claiming conformance to FIPS 151-2 shall
define the POSIX.1 environment variable, LOGNAME, in the
environment for the login shell. [See POSIX.1 Subclause 2.6 lines
698-699].
d. Implementations claiming conformance to FIPS 151-2 shall
support the POSIX.1 option {NGROUPS_MAX} such that the value of
{NGROUPS_MAX} is greater than or equal to eight (8). [See POSIX.1
Subclause 2.8.3 lines 1013-1015].
e. Implementations claiming conformance to FIPS 151-2 shall
support a minimum value of 25 for the POSIX.1 variable {CHILD_MAX}.
[See POSIX.1 Subclause 2.8.4 lines 1029-1030].
f. Implementations claiming conformance to FIPS 151-2 shall
support a minimum value of 20 for the POSIX.1 variable {OPEN_MAX}.
[See POSIX.1 Subclause 2.8.4 lines 1031-1032].
g. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with {_POSIX_JOB_CONTROL}
being defined in . [See POSIX.1 Subclause 2.9.3 lines
1117-1118].
h. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with {_POSIX_SAVED_IDS} being
defined in . [See POSIX.1 Subclause 2.9.3 lines
1119-1120].
i. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with {_POSIX_CHOWN_RESTRICTED}
being defined in with value other than -1. [See POSIX.1
Subclause 2.9.4 lines 1136-1139].
j. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with {_POSIX_NO_TRUNC} being
defined in with value other than -1. [See POSIX.1
Subclause 2.9.4 lines 1140-1141].
k. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with {_POSIX_VDISABLE} being
defined in with value other than -1. [See POSIX.1
Subclause 2.9.4 lines 1142-1144].
l. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with the setting of the group-
ID of a file (when it is created) to that of its parent directory.
[See POSIX.1 Subclause 5.3.1.2, 5.4.1.2, and 5.4.2.2 lines 188-192,
384-385, and 431-432].
m. Implementations claiming conformance to FIPS 151-2 shall
support, for terminal devices, the functionality associated with an
interrupted read() such that the return from read() when
interrupted by a signal after successfully reading some data
returns the number of bytes the system has read. [See POSIX.1
Subclause 6.4.1.2 lines 132-134].
n. Implementations claiming conformance to FIPS 151-2 shall
support, for terminal devices, the functionality associated with an
interrupted write() such that the return from write() when
interrupted by a signal after successfully writing some data
returns the number of bytes the system has written. [See POSIX.1
Subclause 6.4.2.2 lines 214-216].
o. Implementations claiming conformance to FIPS 151-2 shall
support the functionality associated with the symbols CS7, CS8,
CSTOPB, PARODD, and PARENB defined in for asynchronous
general terminal interface devices. [See POSIX.1 Subclause 7.1.2.4
lines 383-387].
p. Implementations claiming conformance to FIPS 151-2 shall
document in the POSIX Conformance Document the FIPS 151-2
conditional features implemented [See 11. for documentation
details]. (The term conditional features are the features or
behaviors referred to in FIPS 151-2 that need not be present on all
conforming implementations. IEEE Std 2003.1-1992 lists the
documentation assertions for POSIX.1).
13. Implementation. This standard becomes effective October 15,
1993. This standard is compulsory and binding for use in all
solicitations and contracts for new operating systems where POSIX-
like interfaces are required.
a. Acquisition of a Conforming Portable Operating System
Environment. Operating system environments which are to be
acquired for Federal use after the effective date of this standard
and where POSIX-like interfaces are required shall use this FIPS.
Conformance to this FIPS shall be considered whether the operating
system environments are:
1. developed internally,
2. acquired as part of an ADP system procurement,
3. acquired by separate procurement,
4. used under an ADP leasing arrangement, or
5. specified for use in contracts for programming services.
b. Interpretation of the FIPS for Portable Operating System
Interface for Computer Environments. NIST provides for the
resolution of questions regarding the FIPS specifications and
requirements, and issues official interpretations as needed. All
questions about the interpretation of this FIPS should be addressed
to:
Director
Computer Systems Laboratory
Attn: POSIX FIPS Interpretation
National Institute of Standards and Technology
Gaithersburg, MD 20899
c. Validation of Conforming Operating Systems Environments.
NIST has developed cooperatively with industry a validation suite
for measuring conformance to this standard. This suite is required
for testing conformance of POSIX.1 implementations to FIPS 151-2.
The "NIST POSIX Testing Policy, General Information" and the "NIST
POSIX Testing Policy, Certificate of Validation Requirements, FIPS
151-2" specify the validation requirements.
14. Waivers. Under certain exceptional circumstances, the heads
of Federal departments and agencies may approve waivers to Federal
Information Processing Standards (FIPS). The head of such agency
may redelegate such authority only to a senior official designated
pursuant to section 3506(b) of Title 44, U.S. Code. Waivers shall
be granted only when:
a. Compliance with a standard would adversely affect the
accomplishment of the mission of an operator of a Federal computer
system, or
b. Cause a major adverse financial impact on the operator
which is not offset by Government wide savings.
Agency heads may act upon a written waiver request containing the
information detailed above. Agency heads may also act without a
written waiver request when they determine that conditions for
meeting the standard cannot be met. Agency heads may approve
waivers only by a written decision which explains the basis on
which the agency head made the required finding(s). A copy of each
such decision, with procurement sensitive or classified portions
clearly identified, shall be sent to: National Institute of
Standards and Technology; ATTN: FIPS Waiver Decisions, Technology
Building, Room B-154; Gaithersburg, MD 20899.
In addition, notice of each waiver granted and each delegation of
authority to approve waivers shall be sent promptly to the
Committee on Government Operations of the House of Representatives
and the Committee on Governmental Affairs of the Senate and shall
be published promptly in the Federal Register.
When the determination on a waiver applies to the procurement of
equipment and/or services, a notice of the waiver determination
must be published in the Commerce Business Daily as a part of the
notice of solicitation for offers of an acquisition or, if the
waiver determination is made after that notice is published, by
amendment to such notice.
A copy of the waiver, any supporting documents, the document
approving the waiver and any supporting and accompanying documents,
with such deletions as the agency is authorized and decides to make
under 5 U.S.C. Sec. 552(b), shall be part of the procurement
documentation and retained by the agency.
14. Where to Obtain Copies. Copies of this publication are for
sale by the National Technical Information Service, U.S. Department
of Commerce, Springfield, VA 22161. (Sale of the included
specifications document is by arrangement with the Institute of
Electrical and Electronics Engineers, Incorporated.) When
ordering, refer to Federal Information Processing Standards
Publication 151-2 (FIPSPUB151-2), and title. Payment may be made
by check, money order, or deposit account.
APPENDIX A
Application Portability Profile
FIPS 151-2 is the first component of a series of specifications
needed for an applications portability profile. POSIX.1 provided
the crucial first step by providing a vendor independent interface
specification between an application program and an operating
system. When fully extended, POSIX, will provide the functionality
required to support source code portability for a wide range of
applications across many different machines and operating systems.
NIST has published Special Publication 500-187, Application
Portability Profile (APP), The U.S. Government's Open System
Environment Profile, OSE/1, Version 1.0. The APP has been
developed to provide sufficient functionality to accommodate a
broad range of application requirements. The functional components
of the APP constitute a framework for organizing standard elements
that can be used to develop and maintain portable applications. A
key aspect of the APP is that it is based on an open system
environment defined by non-proprietary specifications. Components
may be added or deleted as technology changes and as Federal
government requirements change.
The Foreword, Abstract, and Key Words follow:
FIPS PUB 151-2
FEDERAL INFORMATION
PROCESSING STANDARDS PUBLICATION
1993 May 12
U.S. DEPARTMENT OF COMMERCE/National Institute of Standards and
Technology
Portable Operating System Interface (POSIX) -
System Application Program Interface [C Language]
U.S. DEPARTMENT OF COMMERCE, Ronald H. Brown,
Secretary
National Institute of Standards and Technology, Raymond G. Kammer,
Acting Director
Foreword
The Federal Information Processing Standards Publication Series
of the National Institute of Standards and Technology (NIST) is the official
publication relating to standards and guidelines adopted and promulgated
under the provisions of Section 111(d) of the Federal Property and
Administrative Services Act of 1949 as amended by the Computer Security
Act
of 1987, Public Law 100-235. These mandates have given the Secretary of
Commerce and NIST important responsibilities for improving the utilization
and management of computers and related telecommunications systems in the
Federal Government. The NIST, through its Computer Systems Laboratory,
provides leadership, technical guidance, and coordination of Government
efforts in the development of standards and guidelines in these areas.
Comments concerning Federal Information Processing Standards
Publications are welcomed and should be addressed to the Director,
Computer Systems Laboratory, National Institute of Standards and
Technology, Gaithersburg, MD 20899.
James H. Burrows, Director
Computer Systems Laboratory
Abstract
This publication announces the adoption of International Standard ISO/IEC
9945-1:1990, Information Technology-Portable Operating System Interface
(POSIX) - Part 1: System Application Program Interface (API) [C
Language],
as a Federal Information Processing Standard. This standard defines
a C programming language source interface to an operating system
environment. This standard is for use by computing professionals involved
in system and application software development and implementation.
This revision supersedes FIPS PUB 151-1 in its entirety.
Key words:application interface standard; applications portability;
Federal Information Processing Standard (FIPS); portability; POSIX.
Return to the FIPS
Home Page