Information technology - Portable Operating System Interface (POSIX®) Base Specifications, Issue 7

ISO/IEC/IEEE 9945:2009 defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level. ISO/IEC/IEEE 9945:2009 is intended to be used by both application developers and system implementers and comprises four major components (each in an associated volume). General terms, concepts, and interfaces common to all volumes of this standard, including utility conventions and C-language header definitions, are included in the Base Definitions volume. Definitions for system service functions and subroutines, language-specific system services for the C programming language, function issues, including portability, error handling, and error recovery, are included in the System Interfaces volume. Definitions for a standard source code-level interface to command interpretation services (a "shell") and common utility programs for application programs are included in the Shell and Utilities volume. Extended rationale that did not fit well into the rest of the document structure, which contains historical information concerning the contents of ISO/IEC/IEEE 9945:2009 and why features were included or discarded by the ISO/IEC/IEEE 9945:2009 developers, is included in the Rationale (Informative) volume. The following areas are outside the scope of ISO/IEC/IEEE 9945:2009: graphics interfaces; database management system interfaces; record I/O considerations; object or binary code portability; system configuration and resource availability. ISO/IEC/IEEE 9945:2009 describes the external characteristics and facilities that are of importance to application developers, rather than the internal construction techniques employed to achieve these capabilities. Special emphasis is placed on those functions and facilities that are needed in a wide variety of commercial applications.

Technologies de l'information — Spécifications de base de l'interface pour la portabilité des systèmes (POSIX®), Issue 7

General Information

Status
Published
Publication Date
14-Sep-2009
Current Stage
9092 - International Standard to be revised
Start Date
30-Apr-2025
Completion Date
30-Oct-2025
Ref Project

Relations

Overview

ISO/IEC/IEEE 9945:2009 - POSIX® Base Specifications, Issue 7 defines a standardized operating system interface and environment to support source-level portability of applications. Published jointly by ISO, IEC, IEEE and based on work by The Open Group and IEEE, this standard specifies the external characteristics of operating system services, a command interpreter (the “shell”), and common utility programs-focusing on what application developers need rather than internal implementation details.

Key Topics

  • Modular structure: four associated volumes covering the Base Definitions, System Interfaces, Shell and Utilities, and a Rationale (informative) volume explaining historical and design choices.
  • Base Definitions: general terms, concepts, utility conventions, and C-language header definitions used across the standard.
  • System Interfaces: definitions of system service functions and subroutines, including language-specific services for the C programming language, portability considerations, and error handling and recovery behaviors.
  • Shell and Utilities: a standard source-level interface to command interpretation services (the shell) and commonly used utility programs that applications can rely on.
  • Scope exclusions: explicitly does not cover graphics interfaces, database management interfaces, record I/O details, object/binary code portability, or system configuration/resource availability.
  • Design focus: describes external facilities and behaviors important to application developers-emphasizing portability across diverse commercial applications.

Applications

ISO/IEC/IEEE 9945:2009 is practical for:

  • Application developers seeking predictable, portable behavior across UNIX-like platforms and POSIX-compliant systems.
  • System implementers and OS vendors creating or certifying POSIX-compliant operating systems, shells, and runtime libraries.
  • Library and tool authors who must conform to standard C headers and utility conventions.
  • Embedded and real-time system integrators that require a defined API surface for portability and predictable error handling.
  • Test labs and certification bodies validating compliance and interoperability.

Benefits include reduced porting cost, clearer interface contracts, and improved interoperability across POSIX-compliant environments.

Related Standards

  • Published in cooperation with IEEE and The Open Group; built on earlier POSIX work and maintained within international standards frameworks.
  • Useful alongside language standards (e.g., C language standards) and platform-specific compliance documents when implementing or testing conformance.

Keywords: ISO/IEC/IEEE 9945:2009, POSIX, POSIX Base Specifications, portability, operating system interface, shell and utilities, C-language headers, application portability.

Standard
ISO/IEC/IEEE 9945:2009 - Information technology -- Portable Operating System Interface (POSIX®) Base Specifications, Issue 7
English language
3807 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ISO/IEC/IEEE 9945:2009 - Information technology -- Portable Operating System Interface (POSIX®) Base Specifications, Issue 7
English language
3807 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


INTERNATIONAL ISO/IEC/
STANDARD IEEE
First edition
2009-09-15
Information technology — Portable ®
Operating System Interface (POSIX )
Base Specifications, Issue 7
Technologies de l'information — Spécifications de base de l'interface ®
pour la portabilité des systèmes (POSIX ), Issue 7

Reference number
All rights reserved
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, such files may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading a PDF file, parties accept therein the responsibility of not infringing Adobe's licensing policy. Neither the ISO Central
Secretariat nor IEEE accepts any liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create the PDF file(s) constituting this document can be found in the General Info relative to
the file(s); the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the files are suitable for
use by ISO member bodies and IEEE members. In the unlikely event that a problem relating to them is found, please inform the ISO
Central Secretariat or IEEE at the address given below.

This CD-ROM contains the publication ISO/IEC/IEEE 9945:2009 in portable document format (PDF), which
can be viewed using Adobe® Acrobat® Reader.
Adobe and Acrobat are trademarks of Adobe Systems Incorporated.
©  IEEE 2001-2008
All rights reserved. Unless required for installation or otherwise specified, no part of this CD-ROM may be reproduced, stored in a retrieval
system or transmitted in any form or by any means without prior permission from either ISO or IEEE. Requests for permission to
reproduce this product should be addressed to
ISO copyright office Institute of Electrical and Electronics Engineers, Inc.
Case postale 56 • CH-1211 Geneva 20 3 Park Avenue, New York • NY 10016-5997, USA
Switzerland Internet stds.ipr@ieee.org
Internet copyright@iso.org
Reproduction may be subject
...


INTERNATIONAL ISO/IEC/
STANDARD IEEE
First edition
2009-09-15
Information technology — Portable ®
Operating System Interface (POSIX )
Base Specifications, Issue 7
Technologies de l'information — Spécifications de base de l'interface ®
pour la portabilité des systèmes (POSIX ), Issue 7

Reference number
All rights reserved
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. Neither the ISO Central
Secretariat nor IEEE accepts any liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies
and IEEE members. In the unlikely event that a problem relating to it is found, please inform the ISO Central Secretariat or IEEE at the
address given below.
©  IEEE 2001-2008
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO or IEEE at the respective
address below.
ISO copyright office Institute of Electrical and Electronics Engineers, Inc.
Case postale 56 • CH-1211 Geneva 20 3 Park Avenue, New York • NY 10016-5997, USA
Tel. + 41 22 749 01 11 E-mail stds.ipr@ieee.org
Fax + 41 22 749 09 47 Web www.ieee.org
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii Copyright © 2001-2008, IEEE and The Open Group. All rights reserved

Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members of
ISO or IEC participate in the development of International Standards through technical committees established
by the respective organization to deal with particular fields of technical activity. ISO and IEC technical
committees collaborate in fields of mutual interest. Other international organizations, governmental and non-
governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO
and IEC have established a joint technical committee, ISO/IEC JTC 1.
IEEE Standards documents are developed within the IEEE Societies and the Standards Coordinating
Committees of the IEEE Standards Association (IEEE-SA) Standards Board. The IEEE develops its standards
through a consensus development process, approved by the American National Standards Institute, which
brings together volunteers representing varied viewpoints and interests to achieve the final product. Volunteers
are not necessarily members of the Institute and serve without compensation. While the IEEE administers the
process and establishes rules to promote fairness in the consensus development process, the IEEE does not
independently evaluate, test, or verify the accuracy of any of the information contained in its standards.
The main task of ISO/IEC JTC 1 is to prepare International Standards. Draft International Standards adopted
by the joint technical committee are circulated to national bodies for voting. Publication as an International
Standard requires approval by at least 75 % of the national bodies casting a vote.
Attention is called to the possibility that implementation of this standard may require the use of subject matter
covered by patent rights. By publication of this standard, no position is taken with respect to the existence or
validity of any patent rights in connection therewith. ISO/IEEE is not responsible for identifying essential
patents or patent claims for which a license may be required, for conducting inquiries into the legal validity or
scope of patents or patent claims or determining whether any licensing terms or conditions provided in
connection with submission of a Letter of Assurance or a Patent Statement and Licensing Declaration Form, if
any, or in any licensing agreements are reasonable or non-discriminatory. Users of this standard are
expressly advised that determination of the validity of any patent rights, and the risk of infringement of such
rights, is entirely their own responsibility. Further information may be obtained from ISO or the IEEE
Standards Association.
ISO/IEC/IEEE 9945 was prepared by The Open Group (as The Open Group Technical Standard Base
Specifications, Issue 7) and the Portable Applications Standards Committee of the Computer Society of the
IEEE (as IEEE Std 1003.1™-2008). It was adopted by Joint Technical Committee ISO/IEC JTC 1, Information
technology, Subcommittee SC 22, Programming languages, their environments and system software
interfaces, in parallel with its approval by the ISO/IEC national bodies, under the “fast-track procedure” defined
in the Partner Standards Development Organization cooperation agreement between ISO and IEEE. IEEE is
responsible for the maintenance of this document with participation and input from ISO/IEC national bodies.
This first edition of ISO/IEC/IEEE 9945 cancels and replaces ISO/IEC 9945-1:2003, ISO/IEC 9945-2:2003,
ISO/IEC 9945-3:2003 and ISO/IEC 9945-4:2003, which have been technically revised. It also
incorporates the Technical Corrigenda ISO/IEC 9945-1:2003/Cor.1:2004, ISO/IEC 9945-2:2003/Cor.1:2004,
ISO/IEC 9945-3:2003/Cor.1:2004 and ISO/IEC 9945-4:2003/Cor.1:2004.

(blank page)
iv Copyright © 2001-2008, IEEE and The Open Group. All rights reserved

Standard for Information Technology– ®
Portable Operating System Interface (POSIX )
Base Specifications, Issue 7
IEEE Computer Society
Sponsored by the
Portable Applications Standards Committee
and
The Open Group
IEEE

IEEE Std 1003.1 -2008
3 Park Avenue
New York, NY 10016-5997, USA (Revision of
IEEE Std 1003.1-2004)
1 December 2008
TM
1003.1
(blank page)
vi Copyright © 2001-2008, IEEE and The Open Group. All rights reserved


IEEE Std 1003.1 -2008
(Revision of
IEEE Std 1003.1-2004)
The Open Group Technical Standard
Base Specifications, Issue 7
Standard for Information Technology— ®
Portable Operating System Interface (POSIX )

Base Specifications, Issue 7
Sponsor
Portable Applications Standards Committee
of the
IEEE Computer Society
and
The Open Group
Approved 26 September 2008
IEEE-SA Standards Board
Approved 24 July 2008
The Open Group
Abstract

POSIX.1-2008 is simultaneously IEEE Std 1003.1 -2008 and The Open Group Technical Standard Base Specifications,
Issue 7.
POSIX.1-2008 defines a standard operating system interface and environment, including a command interpreter (or
“shell”), and common utility programs to support applications portability at the source code level. POSIX.1-2008 is
intended to be used by both application developers and system implementors and comprises four major components
(each in an associated volume):
• General terms, concepts, and interfaces common to all volumes of this standard, including utility conventions and
C-language header definitions, are included in the Base Definitions volume.
• Definitions for system service functions and subroutines, language-specific system services for the C
programming language, function issues, including portability, error handling, and error recovery, are included in
the System Interfaces volume.
• Definitions for a standard source code-level interface to command interpretation services (a “shell”) and common
utility programs for application programs are included in the Shell and Utilities volume.
• Extended rationale that did not fit well into the rest of the document structure, which contains historical
information concerning the contents of POSIX.1-2008 and why features were included or discarded by the
standard developers, is included in the Rationale (Informative) volume.
The following areas are outside the scope of POSIX.1-2008:
• Graphics interfaces
• Database management system interfaces
• Record I/O considerations
• Object or binary code portability
• System configuration and resource availability
POSIX.1-2008 describes the external characteristics and facilities that are of importance to application developers, rather
than the internal construction techniques employed to achieve these capabilities. Special emphasis is placed on those
functions and facilities that are needed in a wide variety of commercial applications.
Keywords
application program interface (API), argument, asynchronous, basic regular expression (BRE), batch job, batch system,
built-in utility, byte, child, command language interpreter, CPU, extended regular expression (ERE), FIFO, file access ®
control mechanism, input/output (I/O), job control, network, portable operating system interface (POSIX ), parent, shell,
stream, string, synchronous, system, thread, X/Open System Interface (XSI)

The Institute of Electrical and Electronics Engineers, Inc.
3 Park Avenue, New York, NY 10016-5997, USA
The Open Group
Thames Tower, Station Road, Reading, Berkshire, RG1 1LX, U.K.
All rights reserved.
Published 1 December 2008 by the IEEE. Printed in the United States of America by the IEEE.
PDF: ISBN 978-0-7381-5798-6 STD95820
CDROM: ISBN 978-0-7381-5799-3 STDCD95820
Published 1 December 2008 by The Open Group. Printed in the United Kingdom by The Open Group.
Doc. Number: C082
ISBN: 1-931624-79-8
No part of this publication may be reproduced in any form, in an electronic retrieval system or otherwise, without the prior written permission of the
publisher. Permission to reproduce all or any part of this standard must be with the consent of both copyright holders and may be subject to a license
fee. Both copyright holders will need to be satisfied that the other has granted permission. Requests should be sent by email to
austin-group-permissions@opengroup.org.
This standard has been prepared by the Austin Group. Feedback relating to the material contained within this standard may be submitted by using the
Austin Group web site at www.opengroup.org/austin/defectform.html.

viii Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7

IEEE
IEEE Standards documents are developed within the IEEE Societies and the Standards Coordinating Committees of the
IEEE Standards Association (IEEE-SA) Standards Board. The IEEE develops its standards through a consensus
development process, approved by the American National Standards Institute, which brings together volunteers
representing varied viewpoints and interests to achieve the final product. Volunteers are not necessarily members of the
Institute and serve without compensation. While the IEEE administers the process and establishes rules to promote
fairness in the consensus development process, the IEEE does not independently evaluate, test, or verify the accuracy of
any of the information contained in its standards.
Use of an IEEE Standard is wholly voluntary. The IEEE disclaims liability for any personal injury, property, or other
damage, of any nature whatsoever, whether special, indirect, consequential, or compensatory, directly or indirectly
resulting from the publication, use of, or reliance upon this, or any other IEEE Standard document.
The IEEE does not warrant or represent the accuracy or content of the material contained herein, and expressly disclaims
any express or implied warranty, including any implied warranty of merchantability or fitness for a specific purpose, or
that the use of the material contained herein is free from patent infringement. IEEE Standards documents are supplied
“AS IS”.
The existence of an IEEE Standard does not imply that there are no other ways to produce, test, measure, purchase,
market, or provide other goods and services related to the scope of the IEEE Standard. Furthermore, the viewpoint
expressed at the time a standard is approved and issued is subject to change brought about through developments in the
state of the art and comments received from users of the standard. Every IEEE Standard is subjected to review at least
every five years for revision or reaffirmation. When a document is more than five years old and has not been reaffirmed,
it is reasonable to conclude that its contents, although still of some value, do not wholly reflect the present state of the
art. Users are cautioned to check to determine that they have the latest edition of any IEEE Standard.
In publishing and making this document available, the IEEE is not suggesting or rendering professional or other services
for, or on behalf of, any person or entity. Nor is the IEEE undertaking to perform any duty owed by any other person or
entity to another. Any person utilizing this, and any other IEEE Standards document, should rely upon the advice of a
competent professional in determining the exercise of reasonable care in any given circumstances.
Interpretations: Occasionally questions may arise regarding the meaning of portions of standards as they relate to
specific applications. When the need for interpretations is brought to the attention of IEEE, the Institute will initiate
action to prepare appropriate responses. Since IEEE Standards represent a consensus of concerned interests, it is
important to ensure that any interpretation has also received the concurrence of a balance of interests. For this reason,
IEEE and the members of its societies and Standards Coordinating Committees are not able to provide an instant
response to interpretation requests except in those cases where the matter has previously received formal consideration.
At lectures, symposia, seminars, or educational courses, an individual presenting information on IEEE Standards shall
make it clear that his or her views should be considered the personal views of that individual rather than the formal
position, explanation, or interpretation of the IEEE.
Comments for revision of IEEE Standards are welcome from any interested party, regardless of membership affiliation
A
with IEEE. Suggestions for changes in documents should be in the form of a proposed change of text, together with
appropriate supporting comments. Comments on standards and requests for interpretations should be addressed to:
Secretary, IEEE-SA Standards Board
445 Hoes Lane
Piscataway, NJ 08854
USA
Authorization to photocopy portions of any individual standard for internal or personal use is granted by the Institute of
Electrical and Electronics Engineers, Inc., provided that the appropriate fee is paid to Copyright Clearance Center. To
arrange for payment of licensing fee, please contact Copyright Clearance Center, Customer Service, 222 Rosewood
Drive, Danvers, MA 01923 USA; +1 978 750 8400. Permission to photocopy portions of any individual standard for
educational classroom use can also be obtained through the Copyright Clearance Center.

A
For this standard please send comments via the Austin Group, as indicated on page ii.

Base Specifications, Issue 7 Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. ix

The Open Group
The Open Group is a vendor-neutral and technology-neutral consortium, whose vision of Boundaryless Information

Flow will enable access to integrated information within and between enterprises based on open standards and global
interoperability. The Open Group works with customers, suppliers, consortia, and other standards bodies. Its role is to
capture, understand, and address current and emerging requirements, establish policies, and share best practices; to
facilitate interoperability, develop consensus, and evolve and integrate specifications and Open Source technologies; to
offer a comprehensive set of services to enhance the operational efficiency of consortia; and to operate the industry's ®
premier certification service, including UNIX certification.
Further information on The Open Group is available at www.opengroup.org.
The Open Group has over 20 years' experience in developing and operating certification programs and has extensive
experience developing and facilitating industry adoption of test suites used to validate conformance to an open standard
or specification.
The Open Group publishes a wide range of technical documentation, the main part of which is focused on development
of Technical and Product Standards and Guides, but which also includes white papers, technical studies, branding and
testing documentation, and business titles. Full details and a catalog are available at www.opengroup.org/bookstore.
As with all live documents, Technical Standards and Specifications require revision to align with new developments and
associated international standards. To distinguish between revised specifications which are fully backwards compatible
and those which are not:
• A new Version indicates there is no change to the definitive information contained in the previous publication of
that title, but additions/extensions are included. As such, it replaces the previous publication.
• A new Issue indicates there is substantive change to the definitive information contained in the previous
publication of that title, and there may also be additions/extensions. As such, both previous and new documents
are maintained as current publications.
Readers should note that Corrigenda may apply to any publication. Corrigenda information is published at
www.opengroup.org/corrigenda.
x Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7

Introduction
This introduction is not part of POSIX.1-2008, Standard for Information Technology – Portable Operating System
Interface (POSIX).
This standard was developed, and is maintained, by a joint working group of members of the IEEE Portable
Applications Standards Committee, members of The Open Group, and members of ISO/IEC Joint Technical
B
Committee 1. This joint working group is known as the Austin Group.
The Austin Group arose out of discussions amongst the parties which started in early 1998, leading to an initial meeting
and formation of the group in September 1998. The purpose of the Austin Group is to develop and maintain the core ®
open systems interfaces that are the POSIX 1003.1 (and former 1003.2) standards, ISO/IEC 9945, and the core of the
Single UNIX Specification.
The approach to specification development has been one of “write once, adopt everywhere”, with the deliverables being
a set of specifications that carry the IEEE POSIX designation, The Open Group's Technical Standard designation, and an
ISO/IEC designation.
This unique development has combined both the industry-led efforts and the formal standardization activities into a
single initiative, and included a wide spectrum of participants. The Austin Group continues as the maintenance body for
this document.
Anyone wishing to participate in the Austin Group should contact the chair with their request. There are no fees for
participation or membership. You may participate as an observer or as a contributor. You do not have to attend face-to-
face meetings to participate; electronic participation is most welcome. For more information on the Austin Group and
how to participate, see www.opengroup.org/austin.
Background
The developers of POSIX.1-2008 represent a cross-section of hardware manufacturers, vendors of operating systems and
other software development tools, software designers, consultants, academics, authors, applications programmers, and
others.
Conceptually, POSIX.1-2008 describes a set of fundamental services needed for the efficient construction of application
programs. Access to these services has been provided by defining an interface, using the C programming language, a
command interpreter, and common utility programs that establish standard semantics and syntax. Since this interface
enables application developers to write portable applications – it was developed with that goal in mind – it has been
C
designated POSIX , an acronym for Portable Operating System Interface.
Although originated to refer to the original IEEE Std 1003.1-1988, the name POSIX more correctly refers to a family of
related standards: IEEE Std 1003.n and the parts of ISO/IEC 9945. In earlier editions of the IEEE standard, the term
POSIX was used as a synonym for IEEE Std 1003.1-1988. A preferred term, POSIX.1, emerged. This maintained the
advantages of readability of the symbol “POSIX” without being ambiguous with the POSIX family of standards.
Audience
The intended audience for POSIX.1-2008 is all persons concerned with an industry-wide standard operating system
based on the UNIX system. This includes at least four groups of people:
• Persons buying hardware and software systems
• Persons managing companies that are deciding on future corporate computing directions
• Persons implementing operating systems, and especially
• Persons developing applications where portability is an objective

B
The Austin Group is named after the location of the inaugural meeting held at the IBM facility in Austin, Texas in September 1998.
C
The Name POSIX was suggested by Richard Stallman. It is expected to be pronounced pahz-icks, as in positive, not poh-six, or
other variations. The pronunciation has been published in an attempt to promulgate a standardized way of referring to a standard
operating system interface.
Base Specifications, Issue 7 Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. xi

Purpose
Several principles guided the development of POSIX.1-2008:
• Application-Oriented – The basic goal was to promote portability of application programs across UNIX system
environments by developing a clear, consistent, and unambiguous standard for the interface specification of a
portable operating system based on the UNIX system documentation. POSIX.1-2008 codifies the common,
existing definition of the UNIX system.
• Interface, Not Implementation – POSIX.1-2008 defines an interface, not an implementation. No distinction is
made between library functions and system calls; both are referred to as functions. No details of the
implementation of any function are given (although historical practice is sometimes indicated in the
RATIONALE section). Symbolic names are given for constants (such as signals and error numbers) rather than
numbers.
• Source, Not Object, Portability – POSIX.1-2008 has been written so that a program written and translated for
execution on one conforming implementation may also be translated for execution on another conforming
implementation. POSIX.1-2008 does not guarantee that executable (object or binary) code will execute under a
different conforming implementation than that for which it was translated, even if the underlying hardware is
identical.
• The C Language – The system interfaces and header definitions are written in terms of the standard C language
as specified in the ISO C standard.
• No Superuser, No System Administration – There was no intention to specify all aspects of an operating system.
System administration facilities and functions are excluded from this standard, and functions usable only by the
superuser have not been included. Still, an implementation of the standard interface may also implement features
not in POSIX.1-2008. POSIX.1-2008 is also not concerned with hardware constraints or system maintenance.
• Minimal Interface, Minimally Defined – In keeping with the historical design principles of the UNIX system, the
mandatory core facilities of POSIX.1-2008 have been kept as minimal as possible. Additional capabilities have
been added as optional extensions.
• Broadly Implementable – The developers of POSIX.1-2008 endeavored to make all specified functions
implementable across a wide range of existing and potential systems, including:
— All of the current major systems that are ultimately derived from the original UNIX system code (Version 7
or later)
— Compatible systems that are not derived from the original UNIX system code
— Emulations hosted on entirely different operating systems
— Networked systems
— Distributed systems
— Systems running on a broad range of hardware
No direct references to this goal appear in POSIX.1-2008, but some results of it are mentioned in the Rationale
(Informative) volume.
• Minimal Changes to Historical Implementations – When the original version – IEEE Std 1003.1-1988 – was
published, there were no known historical implementations that did not have to change. However, there was a
broad consensus on a set of functions, types, definitions, and concepts that formed an interface that was common
to most historical implementations.
The adoption of the 1988 and 1990 IEEE system interface standards, the 1992 IEEE shell and utilities standard,
the various Open Group (formerly X/Open) specifications, and IEEE Std 1003.1-2001 and its technical
corrigenda have consolidated this consensus, and this version reflects the significantly increased level of
consensus arrived at since the original versions. The authors of the original versions tried, as much as possible, to
follow the principles below when creating new specifications:
— By standardizing an interface like one in an historical implementation; for example, directories
— By specifying an interface that is readily implementable in terms of, and backwards-compatible with,
historical implementations, such as the extended tar format defined in the pax utility
— By specifying an interface that, when added to an historical implementation, will not conflict with it; for
example, the sigaction() function

xii Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7

POSIX.1-2008 is specifically not a codification of a particular vendor's product.
It should be noted that implementations will have different kinds of extensions. Some will reflect “historical
usage” and will be preserved for execution of pre-existing applications. These functions should be considered
“obsolescent” and the standard functions used for new applications. Some extensions will represent functions
beyond the scope of POSIX.1-2008. These need to be used with careful management to be able to adapt to future
extensions of POSIX.1-2008 and/or port to implementations that provide these services in a different manner.
• Minimal Changes to Existing Application Code – A goal of POSIX.1-2008 was to minimize additional work for
application developers. However, because every known historical implementation will have to change at least
slightly to conform, some applications will have to change.
POSIX.1-2008
POSIX.1-2008 defines the Portable Operating System Interface (POSIX) requirements and consists of the following
topics arranged as a series of volumes within the standard:
• Base Definitions
• System Interfaces
• Shell and Utilities
• Rationale (Informative)
Base Definitions
The Base Definitions volume provides common definitions for this standard, therefore readers should be familiar with it
before using the other volumes.
This volume is structured as follows:
• Chapter 1 is an introduction.
• Chapter 2 defines the conformance requirements.
• Chapter 3 defines general terms used.
• Chapter 4 describes general concepts used.
• Chapter 5 describes the notation used to specify file input and output formats in this volume and the Shell and
Utilities volume.
• Chapter 6 describes the portable character set and the process of character set definition.
• Chapter 7 describes the syntax for defining internationalization locales as well as the POSIX locale provided on
all systems.
• Chapter 8 describes the use of environment variables for internationalization and other purposes.
• Chapter 9 describes the syntax of pattern matching using regular expressions employed by many utilities and
matched by the regcomp() and regexec() functions.
• Chapter 10 describes files and devices found on all systems.
• Chapter 11 describes the asynchronous terminal interface for many of the functions in the System Interfaces
volume and the stty utility in the Shell and Utilities volume.
• Chapter 12 describes the policies for command line argument construction and parsing.
• Chapter 13 defines the contents of headers which declare the functions and global variables, and define types,
constants, macros, and data structures that are needed by programs using the services provided by the System
Interfaces volume.
Comprehensive references are available in the index.
System Interfaces
The System Interfaces volume describes the interfaces offered to application programs by POSIX-conformant systems.
Readers are expected to be experienced C language programmers, and to be familiar with the Base Definitions volume.
This volume is structured as follows:
• Chapter 1 explains the status of this volume and its relationship to other formal standards.
• Chapter 2 contains important concepts, terms, and caveats relating to the rest of this volume.
• Chapter 3 defines the functional interfaces to the POSIX-conformant system.
Comprehensive references are available in the index.

Base Specifications, Issue 7 Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. xiii

Shell and Utilities
The Shell and Utilities volume describes the commands and utilities offered to application programs on POSIX-
conformant systems. Readers are expected to be familiar with the Base Definitions volume.
This volume is structured as follows:
• Chapter 1 explains the status of this volume and its relationship to other formal standards. It also describes the
defaults used by the utility descriptions.
• Chapter 2 describes the command language used in POSIX-conformant systems, and special built-in utilities.
• Chapter 3 describes a set of services and utilities that are implemented on systems supporting the Batch
Environment Services and Utilities option.
• Chapter 4 consists of reference pages for all utilities, other than the special built-in utilities described in Chapter
2, available on POSIX-conformant systems.
Comprehensive references are available in the index.
Rationale (Informative)
The Rationale volume is published to assist in the process of review. It contains historical information concerning the
contents of this standard and why features were included or discarded by the standard developers. It also contains notes
of interest to application programmers on recommended programming practices, emphasizing the consequences of some
aspects of POSIX.1-2008 that may not be immediately apparent.
This volume is organized in parallel to the normative volumes of this standard, with a separate part for each of the three
normative volumes.
Within this volume, the following terms are used:
• Base standard – The portions of POSIX.1-2008 that are not optional, equivalent to the definitions of classic
POSIX.1 and POSIX.2.
• POSIX.0 – Although this term is not used in the normative text of POSIX.1-2008, it is used in this volume to

refer to IEEE Std 1003.0 -1995.
• POSIX.1b – Although this term is not used in the normative text of POSIX.1-2008, it is used in this volume to
refer to the elements of the POSIX Realtime Extension amendment. (This was earlier referred to as POSIX.4
during the standard development process.)
• POSIX.1c – Although this term is not used in the normative text of POSIX.1-2008, it is used in this volume to
refer to the POSIX Threads Extension amendment. (This was earlier referred to as POSIX.4a during the standard
development process.)
• Standard developers – The individuals and companies in the development organizations responsible for POSIX.1-
2008: the IEEE P1003.1 working groups, The Open Group Base working group, advised by the hundreds of
individual technical experts who balloted the draft standards within the Austin Group, and the member bodies
and technical experts of ISO/IEC JTC 1/SC 22.
• XSI option – The portions of POSIX.1-2008 addressing the extension added for support of the Single UNIX
Specification.
Typographical Conventions
The following typographical conventions are used throughout this standard. In the text, this standard is referred to as
POSIX.1-2008, which is technically identical to The Open Group Base Specifications, Issue 7.
The typographical conventions listed here are for ease of reading only. Editorial inconsistencies in the use of typography
are unintentional and have no normative meaning in POSIX.1-2008.

xiv Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7

Reference Example Notes
C-Language Data Structure aiocb
C-Language Data Structure Member aio_lio_opcode
C-Language Data Type long
C-Language External Variable errno
C-Language Function system()
C-Language Function Argument arg
C-Language Function Family exec
C-Language Header
C-Language Keyword return
C-Language Macro with Argument assert()
C-Language Macro with No Argument NET_ADDRSTRLEN
C-Language Preprocessing Directive
#define
Commands within a Utility a, c
Conversion Specifier, Specifier/Modifier Character 1
%A, g, E
Environment Variable PATH
Error Number [EINTR]
Example Output
Hello, World
Filename /tmp
Literal Character 2
'c', '\r'
Literal String 2
"abcde"
Optional Items in Utility Syntax
[ ]
Parameter
Special Character 3
Symbolic Constant _POSIX_VDISABLE
Symbolic Limit, Configuration Value {LINE_MAX} 4
Syntax
#include
User Input and Example Code 5
echo Hello, World
Utility Name awk
Utility Operand file_name
Utility Option -c
Utility Option with Option-Argument -w width
Note that:
1. Conversion specifications, specifier characters, and modifier characters are used primarily in date-related
functions and utilities and the fprintf() and fscanf() formatting functions.
2. Unless otherwise noted, the quotes shall not be used as input or output. When used in a list item, the quotes are
omitted. The literal characters (also known as single-quote) and are either shown as
the C constants '\' and '\\', respectively, or as the special characters , single-quote, and
depending on context.
3. The style selected for some of the special characters, such as , matches the form of the input given to
the localedef utility. Generally, the characters selected for this special treatment are those that are not visually
distinct, such as the control characters or .
4. Names surrounded by braces represent symbolic limits or configuration values which may be declared in
appropriate headers by means of the C #define construct.

Base Specifications, Issue 7 Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. xv

5. Brackets shown in this font, "[ ]", are part of the syntax and do not indicate optional items. In syntax the '|'
symbol is used to separate alternatives, and ellipses (".") are used to show that additional arguments are
optional.
Shading is used to identify extensions and options.
Footnotes and notes within the body of the normative text are for information only (informative).
Informative sections (such as Rationale, Change History, Application Usage, and so on) are denoted by continuous
shading bars in the margins.
Ranges of values are indicated with parentheses or brackets as follows:
1. (a,b) means the range of all values from a to b, including neither a nor b.
2. [a,b] means the range of all values from a to b, including a and b.
3. [a,b) means the range of all values from a to b, including a, but not b.
4. (a,b] means the range of all values from a to b, including b, but not a.
Note: A symbolic limit beginning with POSIX is treated differently, depending on context. In a C-language header,
the symbol POSIXstring (where string may contain underscores) is represented by the C identifier
_POSIXstring, with a leading underscore required to prevent ISO C standard name space pollution. However,
in other contexts, such as languages other than C, the leading underscore is not used because this requirement
does not exist.
xvi Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7

Notice to Users
Laws and Regulations
Users of this document should consult all applicable laws and regulations. Compliance with the provisions of this
standard does not imply compliance to any applicable regulatory requirements. Implementers of the standard are
responsible for observing or referring to the applicable regulatory requirements. IEEE and The Open Group do not, by
the publication of standards, intend to urge action that is not in compliance with applicable laws, and these documents
may not be construed as doing so.
Copyrights
This document is copyrighted by the IEEE and The Open Group. It is made available for a wide variety of both public
and private uses. These include both use, by reference, in laws and regulations, and use in private self-regulation,
standardization, and the promotion of engineering practices and methods. By making this document available for use
and adoption by public authorities and private users, the IEEE and The Open Group do not waive any rights in copyright
to this document.
Updating of IEEE Documents
Users of IEEE standards should be aware that these documents may be superseded at any time by the issuance of new
editions or may be amended from time to time through the issuance of amendments, corrigenda, or errata. An official
IEEE document at any point in time consists of the current edition of the document together with any amendments,
corrigenda, or errata then in effect. In order to determine whether a given document is the current edition and whether it
has been amended through the issuance of amendments, corrigenda, or errata, visit the IEEE Standards Association web
site at ieeexplore.ieee.org/xpl/standards.jsp, or contact the IEEE at the address listed previously.
For more information about the IEEE Standards Association or the IEEE standards development process, visit the IEEE-
SA web site at standards.ieee.org.
Errata
Errata, if any, for this and all other standards can be accessed at the following web site:
standards.ieee.org/reading/ieee/updates/errata. Users are encouraged to check this URL for errata periodically.
Feedback
POSIX.1-2008 has been prepared by the Austin Group. Feedback relating to the material contained in POSIX.1-2008
may be submitted using the Austin Group web site at www.opengroup.org/austin/defectform.html.
Interpretations
Current interpretations can be accessed at the following web site: standards.ieee.org/reading/ieee/interp.
Patents
Attention is called to the possibility that implementation of this standard may require use of subject matter covered by
patent rights. By publication of this standard, no position is taken with respect to the existence or validity of any patent
rights in connection therewith. A patent holder or patent applicant has filed a statement of assurance that it will grant
licenses under these rights without compensation or under reasonable rates, with reasonable terms and conditions that
are demonstrably free of any unfair discrimination to applicants desiring to obtain such licenses. Other Essential Patent
Claims may exist for which a statement of assurance has not been received. The IEEE and The Open Group are not
responsible for identifying Essential Patent Claims for which a license may be required, for conducting inquiries into the
legal validity or scope of Patents Claims, or determining whether any licensing terms or conditions are reasonable or
non-discriminatory. Further information may be obtained from the IEEE Standards Association and The Open Group.
Base Specifications, Issue 7 Copyright © 2001-2008, IEEE and The Open Group. All rights reserved. xvii

Contents
Volume 1 Base Definitions, Issue 7. 1
Chapter 1 Introduction. 3
1.1 Scope. 3
1.2 Conformance. 4
1.3 NormativeReferences . 4
1.4 Change History . 5
1.5 Terminology . 5
1.6 Definitions and Concepts. 6
1.7 Portability. 6
1.7.1 Codes. 7
1.7.2 Margin Code Notation. 13
Chapter 2 Conformance. 15
2.1 Implementation Conformance . 15
2.1.1 Requirements . 15
2.1.2 Documentation. 16
2.1.3 POSIX Conformance . 16
2.1.4 XSI Conformance . 19
2.1.5 OptionGroups . 20
2.1.6 Options. 26
2.2 Application Conformance . 29
2.2.1 Strictly Conforming POSIX Application. 29
2.2.2 Conforming POSIX Application. 30
2.2.3 Conforming POSIX Application Using Extensions. 30
2.2.4 Strictly
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...

Frequently Asked Questions

ISO/IEC/IEEE 9945:2009 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology - Portable Operating System Interface (POSIX®) Base Specifications, Issue 7". This standard covers: ISO/IEC/IEEE 9945:2009 defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level. ISO/IEC/IEEE 9945:2009 is intended to be used by both application developers and system implementers and comprises four major components (each in an associated volume). General terms, concepts, and interfaces common to all volumes of this standard, including utility conventions and C-language header definitions, are included in the Base Definitions volume. Definitions for system service functions and subroutines, language-specific system services for the C programming language, function issues, including portability, error handling, and error recovery, are included in the System Interfaces volume. Definitions for a standard source code-level interface to command interpretation services (a "shell") and common utility programs for application programs are included in the Shell and Utilities volume. Extended rationale that did not fit well into the rest of the document structure, which contains historical information concerning the contents of ISO/IEC/IEEE 9945:2009 and why features were included or discarded by the ISO/IEC/IEEE 9945:2009 developers, is included in the Rationale (Informative) volume. The following areas are outside the scope of ISO/IEC/IEEE 9945:2009: graphics interfaces; database management system interfaces; record I/O considerations; object or binary code portability; system configuration and resource availability. ISO/IEC/IEEE 9945:2009 describes the external characteristics and facilities that are of importance to application developers, rather than the internal construction techniques employed to achieve these capabilities. Special emphasis is placed on those functions and facilities that are needed in a wide variety of commercial applications.

ISO/IEC/IEEE 9945:2009 defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level. ISO/IEC/IEEE 9945:2009 is intended to be used by both application developers and system implementers and comprises four major components (each in an associated volume). General terms, concepts, and interfaces common to all volumes of this standard, including utility conventions and C-language header definitions, are included in the Base Definitions volume. Definitions for system service functions and subroutines, language-specific system services for the C programming language, function issues, including portability, error handling, and error recovery, are included in the System Interfaces volume. Definitions for a standard source code-level interface to command interpretation services (a "shell") and common utility programs for application programs are included in the Shell and Utilities volume. Extended rationale that did not fit well into the rest of the document structure, which contains historical information concerning the contents of ISO/IEC/IEEE 9945:2009 and why features were included or discarded by the ISO/IEC/IEEE 9945:2009 developers, is included in the Rationale (Informative) volume. The following areas are outside the scope of ISO/IEC/IEEE 9945:2009: graphics interfaces; database management system interfaces; record I/O considerations; object or binary code portability; system configuration and resource availability. ISO/IEC/IEEE 9945:2009 describes the external characteristics and facilities that are of importance to application developers, rather than the internal construction techniques employed to achieve these capabilities. Special emphasis is placed on those functions and facilities that are needed in a wide variety of commercial applications.

ISO/IEC/IEEE 9945:2009 is classified under the following ICS (International Classification for Standards) categories: 35.060 - Languages used in information technology. The ICS classification helps identify the subject area and facilitates finding related standards.

ISO/IEC/IEEE 9945:2009 has the following relationships with other standards: It is inter standard links to ISO/IEC/IEEE FDIS 9945, ISO/IEC 9945-1:2003, ISO/IEC 9945-3:2003, ISO/IEC 9945-2:2003, ISO/IEC 9945-4:2003. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.

You can purchase ISO/IEC/IEEE 9945:2009 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of ISO standards.