⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xcu_chap01.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>Introduction</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h2><a name="tag_01"></a>Introduction</h2><h3><a name="tag_01_01"></a>Scope</h3><p>The scope of IEEE&nbsp;Std&nbsp;1003.1-2001 is described in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001.</p><h3><a name="tag_01_02"></a>Conformance</h3><p>Conformance requirements for IEEE&nbsp;Std&nbsp;1003.1-2001 are defined in the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap02.html#tag_02">Chapter 2, Conformance</a>.</p><h3><a name="tag_01_03"></a>Normative References</h3><p>Normative references for IEEE&nbsp;Std&nbsp;1003.1-2001 are defined in the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001.</p><h3><a name="tag_01_04"></a>Change History</h3><p>Change history is described in the Rationale (Informative) volume of IEEE&nbsp;Std&nbsp;1003.1-2001, and in the CHANGE HISTORYsection of reference pages.</p><h3><a name="tag_01_05"></a>Terminology</h3><p>This section appears in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, but is repeated here for convenience:</p><p>For the purposes of IEEE&nbsp;Std&nbsp;1003.1-2001, the following terminology definitions apply:</p><h4><a name="tag_01_05_01"></a>can</h4><p>Describes a permissible optional feature or behavior available to the user or application. The feature or behavior is mandatoryfor an implementation that conforms to IEEE&nbsp;Std&nbsp;1003.1-2001. An application can rely on the existence of the feature orbehavior.</p><h4><a name="tag_01_05_02"></a>implementation-defined</h4><p>Describes a value or behavior that is not defined by IEEE&nbsp;Std&nbsp;1003.1-2001 but is selected by an implementor. The valueor behavior may vary among implementations that conform to IEEE&nbsp;Std&nbsp;1003.1-2001. An application should not rely on theexistence of the value or behavior. An application that relies on such a value or behavior cannot be assured to be portable acrossconforming implementations.</p><p>The implementor shall document such a value or behavior so that it can be used correctly by an application.</p><h4><a name="tag_01_05_03"></a>legacy</h4><p>Describes a feature or behavior that is being retained for compatibility with older applications, but which has limitationswhich make it inappropriate for developing portable applications. New applications should use alternative means of obtainingequivalent functionality.</p><h4><a name="tag_01_05_04"></a>may</h4><p>Describes a feature or behavior that is optional for an implementation that conforms to IEEE&nbsp;Std&nbsp;1003.1-2001. Anapplication should not rely on the existence of the feature or behavior. An application that relies on such a feature or behaviorcannot be assured to be portable across conforming implementations.</p><p>To avoid ambiguity, the opposite of <i>may</i> is expressed as <i>need not</i>, instead of <i>may not</i>.</p><h4><a name="tag_01_05_05"></a>shall</h4><p>For an implementation that conforms to IEEE&nbsp;Std&nbsp;1003.1-2001, describes a feature or behavior that is mandatory. Anapplication can rely on the existence of the feature or behavior.</p><p>For an application or user, describes a behavior that is mandatory.</p><h4><a name="tag_01_05_06"></a>should</h4><p>For an implementation that conforms to IEEE&nbsp;Std&nbsp;1003.1-2001, describes a feature or behavior that is recommended butnot mandatory. An application should not rely on the existence of the feature or behavior. An application that relies on such afeature or behavior cannot be assured to be portable across conforming implementations.</p><p>For an application, describes a feature or behavior that is recommended programming practice for optimum portability.</p><h4><a name="tag_01_05_07"></a>undefined</h4><p>Describes the nature of a value or behavior not defined by IEEE&nbsp;Std&nbsp;1003.1-2001 which results from use of an invalidprogram construct or invalid data input.</p><p>The value or behavior may vary among implementations that conform to IEEE&nbsp;Std&nbsp;1003.1-2001. An application should notrely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannotbe assured to be portable across conforming implementations.</p><h4><a name="tag_01_05_08"></a>unspecified</h4><p>Describes the nature of a value or behavior not specified by IEEE&nbsp;Std&nbsp;1003.1-2001 which results from use of a validprogram construct or valid data input.</p><p>The value or behavior may vary among implementations that conform to IEEE&nbsp;Std&nbsp;1003.1-2001. An application should notrely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannotbe assured to be portable across conforming implementations.</p><h3><a name="tag_01_06"></a>Definitions</h3><p>Concepts and definitions are defined in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001.</p><h3><a name="tag_01_07"></a>Relationship to Other Documents</h3><h4><a name="tag_01_07_01"></a>System Interfaces</h4><p>This subsection describes some of the features provided by the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001 thatare assumed to be globally available on all systems conforming to this volume of IEEE&nbsp;Std&nbsp;1003.1-2001. This subsectiondoes not attempt to detail all of the features defined in the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001 that arerequired by all of the utilities defined in this volume of IEEE&nbsp;Std&nbsp;1003.1-2001; the utility and function descriptionspoint out additional functionality required to provide the corresponding specific features needed by each.</p><p>The following subsections describe frequently used concepts. Many of these concepts are described in the Base Definitions volumeof IEEE&nbsp;Std&nbsp;1003.1-2001. Utility and function description statements override these defaults when appropriate.</p><h5><a name="tag_01_07_01_01"></a>Process Attributes</h5><p>The following process attributes, as described in the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, are assumed tobe supported for all processes in this volume of IEEE&nbsp;Std&nbsp;1003.1-2001:</p><blockquote><table cellpadding="3"><tr valign="top"><td align="left"><p class="tent"><br>Controlling Terminal<br>Current Working Directory<br>Effective Group ID<br>Effective User ID<br>File Descriptors<br>File Mode Creation Mask<br>Process Group ID<br>Process ID<br></p></td><td align="left"><p class="tent"><br>Real Group ID<br>Real User ID<br>Root Directory<br>Saved Set-Group-ID<br>Saved Set-User-ID<br>Session Membership<br>Supplementary Group IDs<br></p></td></tr></table></blockquote><p>A conforming implementation may include additional process attributes.</p><h5><a name="tag_01_07_01_02"></a>Concurrent Execution of Processes</h5><p>The following functionality of the <a href="../functions/fork.html"><i>fork</i>()</a> function defined in the System Interfacesvolume of IEEE&nbsp;Std&nbsp;1003.1-2001 shall be available on all systems conforming to this volume ofIEEE&nbsp;Std&nbsp;1003.1-2001:</p><ol><li><p>Independent processes shall be capable of executing independently without either process terminating.</p></li><li><p>A process shall be able to create a new process with all of the attributes referenced in <a href="#tag_01_07_01_01">ProcessAttributes</a> , determined according to the semantics of a call to the <a href="../functions/fork.html"><i>fork</i>()</a> functiondefined in the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001 followed by a call in the child process to one of the<i>exec</i> functions defined in the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001.</p></li></ol><h5><a name="tag_01_07_01_03"></a>File Access Permissions</h5><p>The file access control mechanism described by the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap04.html#tag_04_04">Section 4.4, File Access Permissions</a> shall apply to all files on an implementationconforming to this volume of IEEE&nbsp;Std&nbsp;1003.1-2001.</p><h5><a name="tag_01_07_01_04"></a>File Read, Write, and Creation</h5><p>If a file that does not exist is to be written, it shall be created as described below, unless the utility description statesotherwise.</p><p>When a file that does not exist is created, the following features defined in the System Interfaces volume ofIEEE&nbsp;Std&nbsp;1003.1-2001 shall apply unless the utility or function description states otherwise:</p><ol><li><p>The user ID of the file shall be set to the effective user ID of the calling process.</p></li><li><p>The group ID of the file shall be set to the effective group ID of the calling process or the group ID of the directory in whichthe file is being created.</p></li><li><p>If the file is a regular file, the permission bits of the file shall be set to:</p><blockquote><pre>S_IROTH | S_IWOTH | S_IRGRP | S_IWGRP | S_IRUSR | S_IWUSR</pre></blockquote><p>(see the description of <i>File Modes</i> in the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap13.html#tag_13">Chapter 13, Headers</a>, <a href="../basedefs/sys/stat.h.html"><i>&lt;sys/stat.h&gt;</i></a>)except that the bits specified by the file mode creation mask of the process shall be cleared. If the file is a directory, thepermission bits shall be set to:</p><blockquote><pre>S_IRWXU | S_IRWXG | S_IRWXO</pre></blockquote><p>except that the bits specified by the file mode creation mask of the process shall be cleared.</p></li><li><p>The <i>st_atime</i>, <i>st_ctime</i>, and <i>st_mtime</i> fields of the file shall be updated as specified in the SystemInterfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../functions/xsh_chap02_05.html">Section 2.5, Standard I/OStreams</a>.</p></li><li><p>If the file is a directory, it shall be an empty directory; otherwise, the file shall have length zero.</p></li><li><p>If the file is a symbolic link, the effect shall be undefined unless the {POSIX2_SYMLINKS} variable is in effect for thedirectory in which the symbolic link would be created.</p></li><li><p>Unless otherwise specified, the file created shall be a regular file.</p></li></ol><p>When an attempt is made to create a file that already exists, the utility shall take the action indicated in <a href="#tagtcjh_1">Actions when Creating a File that Already Exists</a> corresponding to the type of the file the utility is trying tocreate and the type of the existing file, unless the utility description states otherwise.</p><hr><center><b><a name="tagtcjh_1"></a> Table: Actions when Creating a File that Already Exists</b></center><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th colspan="2" align="center"><p class="tent"><b>&nbsp;</b></p></th><th colspan="11" align="center"><p class="tent"><b>New Type</b></p></th><th align="center"><p class="tent"><b>Function</b></p></th></tr><tr valign="top"><th colspan="2" align="center"><p class="tent"><b>Existing Type</b></p></th><th align="center"><p class="tent"><b>B</b></p></th><th align="center"><p class="tent"><b>C</b></p></th><th align="center"><p class="tent"><b>D</b></p></th><th align="center"><p class="tent"><b>F</b></p></th><th align="center"><p class="tent"><b>L</b></p></th><th align="center"><p class="tent"><b>M</b></p></th><th align="center"><p class="tent"><b>P</b></p></th><th align="center"><p class="tent"><b>Q</b></p></th><th align="center"><p class="tent"><b>R</b></p></th><th align="center"><p class="tent"><b>S</b></p></th><th align="center"><p class="tent"><b>T</b></p></th><th align="center"><p class="tent"><b>Creating New</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">A</p></td><td align="left"><p class="tent"><i>fattach</i>()-ed STREAM</p></td><td align="center"><p class="tent">F</p></td><td align="center"><p class="tent">F</p></td><td align="center"><p class="tent">F</p></td><td align="center"><p class="tent">F</p></td><td align="center"><p class="tent">F</p></td><td align="center"><p class="tent">-</p></td><td align="center"><p class="tent">-</p></td><td align="center"><p class="tent">-</p></td><td align="center"><p class="tent">OF</p></td><td align="center"><p class="tent">-</p></td><td align="center"><p class="tent">-</p></td><td align="left"><p class="tent">N/A</p></td></tr><tr valign="top"><td align="left"><p class="tent">B</p></td><td align="left"><p class="tent">Block Special</p></td><td align="center"><p class="tent">F</p></td><td align="center">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -