1、 Standard for Information Technology Portable Operating System Interface (POSIX) Base Specifications, Issue 7 Sponsored by the Portable Applications Standards Committee IEEE 3 Park Avenue New York, NY 10016-5997 USA 19 April 2013 IEEE Computer Society and The Open Group IEEE Std 1003.1, 2013 Edition
2、(incorporates IEEE Std 1003.1-2008, and IEEE Std 1003.1-2008/Cor 1-2013) IEEE Std 1003.1TM, 2013 Edition The Open Group Technical Standard Base Specifications, Issue 7 incorporates IEEE Std 1003.1TM-2008, IEEE Std 1003.1TM-2008/Cor 1-2013 Standard for Information Technology Portable Operating System
3、 Interface (POSIX) Base Specifications, Issue 7 Sponsor Portable Applications Standards Committee of the IEEE Computer Society and The Open Group ii Copyright 2013 IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7 Abstract POSIX.1-2008 is simultaneously IEEE Std 1003.1-2008
4、and The Open Group Technical Standard Base Specifications, Issue 7. This 2013 Edition includes IEEE Std 1003.1-2008/Cor 1-2013 incorporated into IEEE Std 1003.1-2008 (the base document). The Technical Corrigendum addresses problems discovered since the approval of IEEE Std 1003.1-2008. POSIX.1-2008
5、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 compri
6、ses 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 subrout
7、ines, 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
8、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
9、 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 availabil
10、ity 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 var
11、iety 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, IE
12、EE 1003.1, input/output (I/O), job control, network, parent, portable operating system interface (POSIX), shell, stream, string, synchronous, system, thread, X/Open System Interface (XSI) Base Specifications, Issue 7 Copyright 2013 IEEE and The Open Group. All rights reserved. iii The Institute of E
13、lectrical and Electronics Engineers, Inc. 3 Park Avenue, New York, NY 10016-5997, USA The Open Group Apex Plaza, Forbury Road, Reading, Berkshire RG1 1AX, U.K. Copyright 2013 by The Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All rights reserved. Published 19 April 20
14、13 by the IEEE. PDF: ISBN 978-0-7381-8331-2 STD98188 Print: ISBN 978-0-7381-8333-6 STDPD98188 Published 19 April 2013 by The Open Group. Doc. Number: C138 ISBN: 1-937218-28-7 IEEE is a registered trademark in the U.S. Patent +1 978 750 8400. Permission to photocopy portions of any individual standar
15、d for educational classroom use can also be obtained through the Copyright Clearance Center. Base Specifications, Issue 7 Copyright 2013 IEEE and The Open Group. All rights reserved. v The Open Group The Open Group is a global consortium that enables the achievement of business objectives through IT
16、 standards. With more than 400 member organizations, The Open Group has a diverse membership that spans all sectors of the IT community customers, systems and solutions suppliers, tool vendors, integrators, and consultants, as well as academics and researchers to: Capture, understand, and address cu
17、rrent and emerging requirements, and establish policies and share best practices Facilitate interoperability, develop consensus, and evolve and integrate specifications and open source technologies Offer a comprehensive set of services to enhance the operational efficiency of consortia Operate the i
18、ndustrys premier certification service Further information on The Open Group is available at www.opengroup.org. The Open Group publishes a wide range of technical documentation, most of which is focused on development of Open Group Standards and Guides, but which also includes white papers, technica
19、l studies, certification and testing documentation, and business titles. Full details and a catalog are available at www.opengroup.org/bookstore. Readers should note that updates in the form of Corrigenda may apply to any publication. This information is published at www.opengroup.org/corrigenda. vi
20、 Copyright 2013 IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7 Notice to users Laws and regulations Users of IEEE Standards documents should consult all applicable laws and regulations. Compliance with the provisions of any IEEE Standards document does not imply complianc
21、e to any applicable regulatory requirements. Implementers of the standard are responsible for observing or referring to the applicable regulatory requirements. IEEE does not, by the publication of its standards, intend to urge action that is not in compliance with applicable laws, and these document
22、s 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
23、 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 documents should
24、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
25、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-SA website at http:/standards.ieee.org/index.html or contact the IEEE at t
26、he address listed previously. For more information about the IEEE Standards Association or the IEEE standards development process, visit the IEEE-SA website at http:/standards.ieee.org/index.html. Errata Errata, if any, for this and all other standards can be accessed at the following URL: http:/sta
27、ndards.ieee.org/findstds/errata/index.html. Users are encouraged to check this URL for errata periodically. 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
28、taken by the IEEE with respect to the existence or validity of any patent rights in connection therewith. If a patent holder or patent applicant has filed a statement of assurance via an Accepted Letter of Assurance, then the statement is listed on the IEEE-SA website at http:/standards.ieee.org/abo
29、ut/sasb/patcom/patents.html. Letters of Assurance may indicate whether the Submitter is willing or unwilling to grant licenses under patent rights without compensation or under reasonable rates, with reasonable terms and conditions that are demonstrably free of any unfair discrimination to applicant
30、s desiring to obtain such licenses. Essential Patent Claims may exist for which a Letter of Assurance has not been received. The IEEE is 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 C
31、laims, or determining whether any licensing terms or conditions provided in connection with submission of a Letter of Assurance, 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
32、rights, and the risk of infringement of such rights, is entirely their own responsibility. Further information may be obtained from the IEEE Standards Association. Base Specifications, Issue 7 Copyright 2013 IEEE and The Open Group. All rights reserved. vii Participants The Austin Group IEEE Std 100
33、3.1-2008 was prepared by the Austin Group, sponsored by the Portable Applications Standards Committee of the IEEE Computer Society, The Open Group, and ISO/IEC JTC 1/SC 22. At the time of approval, the membership of the Austin Group was as follows: Andrew Josey, Chair Donald W. Cragun, Organizationa
34、l Representative, IEEE PASC Nicholas Stoughton, Organizational Representative, ISO/IEC JTC 1/SC 22 Mark S. Brown, Organizational Representative, The Open Group Cathy Fox, Technical Editor Austin Group Technical Reviewers Theodore P. Baker Hallvard B. Furuseth Stephen Michell Eric Blake Michael Gonza
35、lez Harbour Matthew Rice Andries E. Brouwer Joseph M. Gwinn Joerg Schilling Mark S. Brown Bruno Haible Stephen Schwarm David Butenhof Mark Harris Konrad A. Schwarz Geoff Clare Andrew Josey Keld Simonsen David N. Clissold Michael Kerrisk Nicholas Stoughton Donald W. Cragun David Korn Alexander Terekh
36、ov Lawrence D.K.B. Dwyer Vincent Lefvre William L. Toth Cynthia Eastham Wojtek Lerch Fred J. Tydeman Paul Eggert Evan Liebovitch Mats D. Wichmann Clive D.W. Feather Jens Maurer Garrett Wollman Glenn Fowler Roland McGrath James Youngman Cathy Fox Jim Meyering Working Group Members William J. Ackerman
37、 Karen Gordon Jose Puthenkulam Adewole Akpose Randall Groves G.K. Rajani Butch Anton Scott Gudgel Chet Ramey Peter Anvin Joseph M. Gwinn Matthew Rice Jay Ashford Charles Hammons Gunnar Ritter Theodore P. Baker Mark Harris Robert Robinson Hugh Barrass Barry Hedquist Curtis Royster Jr. William Barthol
38、omew Werner Hoelzl Eusebio Rufian Andy Bihain David Hopwood Wolfgang Sanow Eric Blake David P. Howell Bartien Sayogo Xie Bo James Isaak Nico Schottelius Tomo Bogataj Michael Jones Stephen Schwarm Walter Briscoe Jaimon C. Jose Konrad A. Schwarz Andries E. Brouwer Andrew Josey Glen Seeds Mark S. Brown
39、 Piotr Karocki M. Sekiguchi David Butenhof Sujit Madhavan Karataparambil Al Simons Juan Carreon Michael Kerrisk Keld Simonsen Danila Chernetsov Alexey V. Khoroshilov Antonio Soares Keith Chow Akio Kido Alexander A. Sortov Jimmy Chun William King Thomas Starai Geoff Clare Klaus Klein Nicholas Stought
40、on Tommy Cooper David Korn Ienup Sung Jeffrey L. Copeland Wayne Krone Alfred Mieczyslaw Szmidt viii Copyright 2013 IEEE and The Open Group. All rights reserved. Base Specifications, Issue 7 Donald W. Cragun Thomas Kurihara Alexander Terekhov Dragan S. Cvetkovic Susan Land Donn Terry Lee Damico Kenne
41、th Lang Michael Thomadakis Juan A. de la Puente Shawn Leard John Thywissen David Dice Solomon Lee Leon Toh Thomas Dickey Fernando Lucas Rodriguez William L. Toth Loic Domaigne William Lumpkins Miloslav Trma Steven J. Dovich Scott Lurndal Fred J. Tydeman Ulrich Drepper Lieven Marchand Mark-Rene Uchid
42、a Sourav Dutta Roger Marquis Steve Valentine Lawrence D.K.B. Dwyer Roger J. Martin Peter Van Der Veen Paul Eggert Jack Mccann Fred Web Daniel M. Eischen Mick Meaden Tao Weijian Marc Emmelmann Jim Meyering David Wexelblat Laura Fairhead Gary Michel Mats D. Wichmann Joanna Farley Hai Ming Li Robert Wi
43、lkens Clive D.W. Feather Wilhelm Mueller Martin Wille John Fendrich Bruce Muschlitz Matt Wilson Yaacov Fenster Erik Naggum Michael Wilson Andrew Fieldsend Gergely Nagy Jim Wise Glenn Fowler Michael S. Newman Song Wonchang Cathy Fox Liviu Nicoara Shao A. Wu Jesus Fuente Robert Nordier Oren Yuen Mark
44、Funkenhauser Peter Petrov Janusz Zalewski Michael Geipel Frank Prindle Jim Zepeda Michael Gonzalez Harbour Vikram Punj Jason Zions The Open Group When The Open Group approved the Base Specifications, Issue 7 on 24 July 2008, the membership of the Base Working Group was as follows: Andrew Josey, Chai
45、r Mark S. Brown, Vice Chair and Austin Group Liaison Cathy Fox, Technical Editor Base Working Group Members Basabi Bhattacharya Donald W. Cragun Robbin Kawabata Mark S. Brown Ulrich Drepper Craig Mohrman David Butenhof Lawrence D.K.B. Dwyer Nicholas Stoughton April Chin Cynthia Eastham William L. To
46、th Geoff Clare Roger Faulkner Kenjiro Tsuji David N. Clissold Carol Fields Kevin Van Vechten Base Specifications, Issue 7 Copyright 2013 IEEE and The Open Group. All rights reserved. ix IEEE When the IEEE Standards Board approved IEEE Std 1003.1-2008 on 26 September 2008, the membership of the commi
47、ttees was as follows: Portable Application Standards Committee (PASC) Lowell G. Johnson, Chair Joseph M. Gwinn, Vice Chair Jay Ashford, Functional Chair (Balloting) Andrew Josey, Functional Chair (Interpretations) Curtis Royster Jr., Functional Chair (Logistics) Nicholas Stoughton, Secretary Balloti
48、ng Committee The following members of the individual balloting committee voted on this standard. Balloters may have voted for approval, disapproval, or abstention. William J. Ackerman Andrew Fieldsend Gary Michel Adewole Akpose Michael Geipel Bruce Muschlitz Butch Anton Randall Groves Michael S. New
49、man Jay Ashford Scott Gudgel Peter Petrov Hugh Barrass Joseph M. Gwinn Vikram Punj Andy Bihain Charles Hammons Jose Puthenkulam Tomo Bogataj Michael Gonzalez Harbour Robert Robinson Mark S. Brown Barry Hedquist Fernando Lucas Rodriguez Juan Carreon Werner Hoelzl Bartien Sayogo Danila Chernetsov Andrew Josey Stephen Schwarm Keith Chow Piotr Karocki Thomas Starai Tommy Cooper Thomas Kurihara John Thywissen Donald W. Cragun Susan Land Mark-Rene Uchida Ulrich Drepper Kenneth Lang Robert Wilkens Souray Dutta Shawn Leard Oren Yuen Marc