2899 lines
112 KiB
HTML
2899 lines
112 KiB
HTML
<!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 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-2001<br>
|
|
Copyright © 2001 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 Std 1003.1-2001 is described in the Base Definitions volume of IEEE Std 1003.1-2001.</p>
|
|
|
|
<h3><a name="tag_01_02"></a>Conformance</h3>
|
|
|
|
<p>Conformance requirements for IEEE Std 1003.1-2001 are defined in the Base Definitions volume of
|
|
IEEE Std 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 Std 1003.1-2001 are defined in the Base Definitions volume of
|
|
IEEE Std 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 Std 1003.1-2001, and in the CHANGE HISTORY
|
|
section of reference pages.</p>
|
|
|
|
<h3><a name="tag_01_05"></a>Terminology</h3>
|
|
|
|
<p>This section appears in the Base Definitions volume of IEEE Std 1003.1-2001, but is repeated here for convenience:</p>
|
|
|
|
<p>For the purposes of IEEE Std 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 mandatory
|
|
for an implementation that conforms to IEEE Std 1003.1-2001. An application can rely on the existence of the feature or
|
|
behavior.</p>
|
|
|
|
<h4><a name="tag_01_05_02"></a>implementation-defined</h4>
|
|
|
|
<p>Describes a value or behavior that is not defined by IEEE Std 1003.1-2001 but is selected by an implementor. The value
|
|
or behavior may vary among implementations that conform to IEEE Std 1003.1-2001. An application should not rely on the
|
|
existence of the value or behavior. An application that relies on such a value or behavior cannot be assured to be portable across
|
|
conforming 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 limitations
|
|
which make it inappropriate for developing portable applications. New applications should use alternative means of obtaining
|
|
equivalent 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 Std 1003.1-2001. An
|
|
application should not rely on the existence of the feature or behavior. An application that relies on such a feature or behavior
|
|
cannot 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 Std 1003.1-2001, describes a feature or behavior that is mandatory. An
|
|
application 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 Std 1003.1-2001, describes a feature or behavior that is recommended but
|
|
not mandatory. An application should not rely on the existence of the feature or behavior. An application that relies on such a
|
|
feature 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 Std 1003.1-2001 which results from use of an invalid
|
|
program construct or invalid data input.</p>
|
|
|
|
<p>The value or behavior may vary among implementations that conform to IEEE Std 1003.1-2001. An application should not
|
|
rely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannot
|
|
be 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 Std 1003.1-2001 which results from use of a valid
|
|
program construct or valid data input.</p>
|
|
|
|
<p>The value or behavior may vary among implementations that conform to IEEE Std 1003.1-2001. An application should not
|
|
rely on the existence or validity of the value or behavior. An application that relies on any particular value or behavior cannot
|
|
be 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 Std 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 Std 1003.1-2001 that
|
|
are assumed to be globally available on all systems conforming to this volume of IEEE Std 1003.1-2001. This subsection
|
|
does not attempt to detail all of the features defined in the System Interfaces volume of IEEE Std 1003.1-2001 that are
|
|
required by all of the utilities defined in this volume of IEEE Std 1003.1-2001; the utility and function descriptions
|
|
point 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 volume
|
|
of IEEE Std 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 Std 1003.1-2001, are assumed to
|
|
be supported for all processes in this volume of IEEE Std 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 Interfaces
|
|
volume of IEEE Std 1003.1-2001 shall be available on all systems conforming to this volume of
|
|
IEEE Std 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">Process
|
|
Attributes</a> , determined according to the semantics of a call to the <a href="../functions/fork.html"><i>fork</i>()</a> function
|
|
defined in the System Interfaces volume of IEEE Std 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 Std 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 Std 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 implementation
|
|
conforming to this volume of IEEE Std 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 states
|
|
otherwise.</p>
|
|
|
|
<p>When a file that does not exist is created, the following features defined in the System Interfaces volume of
|
|
IEEE Std 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 which
|
|
the 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 Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap13.html#tag_13">Chapter 13, Headers</a>, <a href="../basedefs/sys/stat.h.html"><i><sys/stat.h></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, the
|
|
permission 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 System
|
|
Interfaces volume of IEEE Std 1003.1-2001, <a href="../functions/xsh_chap02_05.html">Section 2.5, Standard I/O
|
|
Streams</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 the
|
|
directory 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 to
|
|
create 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> </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">
|
|
<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"><i>mknod</i>()**</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">C</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Character Special</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"><i>mknod</i>()**</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">D</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Directory</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">F</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>mkdir</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">F</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">FIFO Special File</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">O</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>mkfifo</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">L</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Symbolic Link</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">FL</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>symlink</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">M</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Shared Memory</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">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>shm_open</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">P</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Semaphore</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">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>sem_open</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">Q</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Message Queue</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">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>mq_open</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">R</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Regular File</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">RF</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>open</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">S</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Socket</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">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><i>bind</i>()</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">T</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Typed Memory</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">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="center">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">*</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The following codes are used in <a href="#tagtcjh_1">Actions when Creating a File that Already Exists</a> :</p>
|
|
|
|
<dl compact>
|
|
<dt>F</dt>
|
|
|
|
<dd>Fail. The attempt to create the new file shall fail and the utility shall either continue with its operation or exit
|
|
immediately with a non-zero exit status, depending on the description of the utility.</dd>
|
|
|
|
<dt>FL</dt>
|
|
|
|
<dd>Follow link. Unless otherwise specified, the symbolic link shall be followed as specified for pathname resolution, and the
|
|
operation performed shall be as if the target of the symbolic link (after all resolution) had been named. If the target of the
|
|
symbolic link does not exist, it shall be as if that nonexistent target had been named directly.</dd>
|
|
|
|
<dt>O</dt>
|
|
|
|
<dd>Open FIFO. When attempting to create a regular file, and the existing file is a FIFO special file:
|
|
|
|
<ol>
|
|
<li>
|
|
<p>If the FIFO is not already open for reading, the attempt shall block until the FIFO is opened for reading.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Once the FIFO is open for reading, the utility shall open the FIFO for writing and continue with its operation.</p>
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
|
|
<dt>OF</dt>
|
|
|
|
<dd>The named file shall be opened with the consequences defined for that file type.</dd>
|
|
|
|
<dt>RF</dt>
|
|
|
|
<dd>Regular file. When attempting to create a regular file, and the existing file is a regular file:
|
|
|
|
<ol>
|
|
<li>
|
|
<p>The user ID, group ID, and permission bits of the file shall not be changed.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The file shall be truncated to zero length.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The <i>st_ctime</i> and <i>st_mtime</i> fields shall be marked for update.</p>
|
|
</li>
|
|
</ol>
|
|
</dd>
|
|
|
|
<dt>-</dt>
|
|
|
|
<dd>The effect is implementation-defined unless specified by the utility description.</dd>
|
|
|
|
<dt>*</dt>
|
|
|
|
<dd>There is no portable way to create a file of this type.</dd>
|
|
|
|
<dt>**</dt>
|
|
|
|
<dd>Not portable.</dd>
|
|
</dl>
|
|
|
|
<p>When a file is to be appended, the file shall be opened in a manner equivalent to using the O_APPEND flag, without the O_TRUNC
|
|
flag, in the <a href="../functions/open.html"><i>open</i>()</a> function defined in the System Interfaces volume of
|
|
IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>When a file is to be read or written, the file shall be opened with an access mode corresponding to the operation to be
|
|
performed. If file access permissions deny access, the requested operation shall fail.</p>
|
|
|
|
<h5><a name="tag_01_07_01_05"></a>File Removal</h5>
|
|
|
|
<p>When a directory that is the root directory or current working directory of any process is removed, the effect is
|
|
implementation-defined. If file access permissions deny access, the requested operation shall fail. Otherwise, when a file is
|
|
removed:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Its directory entry shall be removed from the file system.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The link count of the file shall be decremented.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the file is an empty directory (see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap03.html#tag_03_143">Section 3.143, Empty Directory</a>):</p>
|
|
|
|
<ol type="a">
|
|
<li>
|
|
<p>If no process has the directory open, the space occupied by the directory shall be freed and the directory shall no longer be
|
|
accessible.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If one or more processes have the directory open, the directory contents shall be preserved until all references to the file
|
|
have been closed.</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the file is a directory that is not empty, the <i>st_ctime</i> field shall be marked for update.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the file is not a directory:</p>
|
|
|
|
<ol type="a">
|
|
<li>
|
|
<p>If the link count becomes zero:</p>
|
|
|
|
<ol type="i">
|
|
<li>
|
|
<p>If no process has the file open, the space occupied by the file shall be freed and the file shall no longer be accessible.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If one or more processes have the file open, the file contents shall be preserved until all references to the file have been
|
|
closed.</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the link count is not reduced to zero, the <i>st_ctime</i> field shall be marked for update.</p>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The <i>st_ctime</i> and <i>st_mtime</i> fields of the containing directory shall be marked for update.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<h5><a name="tag_01_07_01_06"></a>File Time Values</h5>
|
|
|
|
<p>All files shall have the three time values described by the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap04.html#tag_04_07">Section 4.7, File Times Update</a>.</p>
|
|
|
|
<h5><a name="tag_01_07_01_07"></a>File Contents</h5>
|
|
|
|
<p>When a reference is made to the contents of a file, <i>pathname</i>, this means the equivalent of all of the data placed in the
|
|
space pointed to by <i>buf</i> when performing the <a href="../functions/read.html"><i>read</i>()</a> function calls in the
|
|
following operations defined in the System Interfaces volume of IEEE Std 1003.1-2001:</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<tt>while (read (fildes, buf, nbytes) > 0)
|
|
;
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p>If the file is indicated by a pathname <i>pathname</i>, the file descriptor shall be determined by the equivalent of the
|
|
following operation defined in the System Interfaces volume of IEEE Std 1003.1-2001:</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<tt>fildes = open (pathname, O_RDONLY);
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p>The value of <i>nbytes</i> in the above sequence is unspecified; if the file is of a type where the data returned by <a href=
|
|
"../functions/read.html"><i>read</i>()</a> would vary with different values, the value shall be one that results in the most data
|
|
being returned.</p>
|
|
|
|
<p>If the <a href="../functions/read.html"><i>read</i>()</a> function calls would return an error, it is unspecified whether the
|
|
contents of the file are considered to include any data from offsets in the file beyond where the error would be returned.</p>
|
|
|
|
<h5><a name="tag_01_07_01_08"></a>Pathname Resolution</h5>
|
|
|
|
<p>The pathname resolution algorithm, described by the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap04.html#tag_04_11">Section 4.11, Pathname Resolution</a>, shall be used by implementations conforming to this
|
|
volume of IEEE Std 1003.1-2001; see also the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap04.html#tag_04_05">Section 4.5, File Hierarchy</a>.</p>
|
|
|
|
<h5><a name="tag_01_07_01_09"></a>Changing the Current Working Directory</h5>
|
|
|
|
<p>When the current working directory (see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap03.html#tag_03_436">Section 3.436, Working Directory</a>) is to be changed, unless the utility or function
|
|
description states otherwise, the operation shall succeed unless a call to the <a href="../functions/chdir.html"><i>chdir</i>()</a>
|
|
function defined in the System Interfaces volume of IEEE Std 1003.1-2001 would fail when invoked with the new working
|
|
directory pathname as its argument.</p>
|
|
|
|
<h5><a name="tag_01_07_01_10"></a>Establish the Locale</h5>
|
|
|
|
<p>The functionality of the <a href="../functions/setlocale.html"><i>setlocale</i>()</a> function defined in the System Interfaces
|
|
volume of IEEE Std 1003.1-2001 shall be available on all systems conforming to this volume of
|
|
IEEE Std 1003.1-2001; that is, utilities that require the capability of establishing an international operating
|
|
environment shall be permitted to set the specified category of the international environment.</p>
|
|
|
|
<h5><a name="tag_01_07_01_11"></a>Actions Equivalent to Functions</h5>
|
|
|
|
<p>Some utility descriptions specify that a utility performs actions equivalent to a function defined in the System Interfaces
|
|
volume of IEEE Std 1003.1-2001. Such specifications require only that the external effects be equivalent, not that any
|
|
effect within the utility and visible only to the utility be equivalent.</p>
|
|
|
|
<h4><a name="tag_01_07_02"></a>Concepts Derived from the ISO C Standard</h4>
|
|
|
|
<p>Some of the standard utilities perform complex data manipulation using their own procedure and arithmetic languages, as defined
|
|
in their EXTENDED DESCRIPTION or OPERANDS sections. Unless otherwise noted, the arithmetic and semantic concepts (precision, type
|
|
conversion, control flow, and so on) shall be equivalent to those defined in the ISO C standard, as described in the following
|
|
sections. Note that there is no requirement that the standard utilities be implemented in any particular programming language.</p>
|
|
|
|
<h5><a name="tag_01_07_02_01"></a>Arithmetic Precision and Operations</h5>
|
|
|
|
<p>Integer variables and constants, including the values of operands and option-arguments, used by the standard utilities listed in
|
|
this volume of IEEE Std 1003.1-2001 shall be implemented as equivalent to the ISO C standard <b>signed long</b> data
|
|
type; floating point shall be implemented as equivalent to the ISO C standard <b>double</b> type. Conversions between types
|
|
shall be as described in the ISO C standard. All variables shall be initialized to zero if they are not otherwise assigned by
|
|
the input to the application.</p>
|
|
|
|
<p>Arithmetic operators and control flow keywords shall be implemented as equivalent to those in the cited ISO C standard
|
|
section, as listed in <a href="#tagtcjh_2">Selected ISO C Standard Operators and Control Flow Keywords</a> .</p>
|
|
|
|
<hr>
|
|
<center><b><a name="tagtcjh_2"></a> Table: Selected ISO C Standard Operators and Control Flow Keywords</b></center>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Operation</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>ISO C Standard Equivalent Reference</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.1, Primary Expressions</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">postfix ++</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.2, Postfix Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">postfix --</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">unary +</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.3, Unary Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">unary -</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">prefix ++</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">prefix --</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">˜</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">!</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><i>sizeof</i>()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">*</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.5, Multiplicative Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">/</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">%</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">+</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.6, Additive Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">-</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><<</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.7, Bitwise Shift Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">>></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><, <=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.8, Relational Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">>, >=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">==</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.9, Equality Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">!=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">&</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.10, Bitwise AND Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">^</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.11, Bitwise Exclusive OR Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">|</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.12, Bitwise Inclusive OR Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">&&</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.13, Logical AND Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">||</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.14, Logical OR Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><i>expr</i>?<i>expr</i>:<i>expr</i></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.15, Conditional Operator</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">=, *=, /=, %=, +=, -=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.5.16, Assignment Operators</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><<=, >>=, &=, ^=, |=</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>if</b> ()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.8.4, Selection Statements</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>if</b> () ... <b>else</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>switch</b> ()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>while</b> ()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.8.5, Iteration Statements</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>do</b> ... <b>while</b> ()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>for</b> ()</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>goto</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Section 6.8.6, Jump Statements</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>continue</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>break</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><b>return</b></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"> </p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The evaluation of arithmetic expressions shall be equivalent to that described in Section 6.5, Expressions, of the ISO C
|
|
standard.</p>
|
|
|
|
<h5><a name="tag_01_07_02_02"></a>Mathematical Functions</h5>
|
|
|
|
<p>Any mathematical functions with the same names as those in the following sections of the ISO C standard:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Section 7.12, Mathematics, <tt><math.h></tt></p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Section 7.20.2, Pseudo-Random Sequence Generation Functions</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>shall be implemented to return the results equivalent to those returned from a call to the corresponding function described in
|
|
the ISO C standard.</p>
|
|
|
|
<h3><a name="tag_01_08"></a>Portability</h3>
|
|
|
|
<p>Some of the utilities in the Shell and Utilities volume of IEEE Std 1003.1-2001 and functions in the System Interfaces
|
|
volume of IEEE Std 1003.1-2001 describe functionality that might not be fully portable to systems meeting the
|
|
requirements for POSIX conformance (see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap02.html#tag_02">Chapter 2, Conformance</a>).</p>
|
|
|
|
<p>Where optional, enhanced, or reduced functionality is specified, the text is shaded and a code in the margin identifies the
|
|
nature of the option, extension, or warning (see <a href="#tag_01_08_01">Codes</a> ). For maximum portability, an application
|
|
should avoid such functionality.</p>
|
|
|
|
<p>Unless the primary task of a utility is to produce textual material on its standard output, application developers should not
|
|
rely on the format or content of any such material that may be produced. Where the primary task <i>is</i> to provide such material,
|
|
but the output format is incompletely specified, the description is marked with the OF margin code and shading. Application
|
|
developers are warned not to expect that the output of such an interface on one system is any guide to its behavior on another
|
|
system.</p>
|
|
|
|
<h4><a name="tag_01_08_01"></a>Codes</h4>
|
|
|
|
<p>Codes and their meanings are listed in the Base Definitions volume of IEEE Std 1003.1-2001, but are repeated here for
|
|
convenience:</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('ADV')">ADV</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Advisory Information <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the ADV margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the ADV margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('AIO')">AIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Asynchronous Input and Output <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the AIO margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the AIO margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Barriers <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the BAR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the BAR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('BE')">BE</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Batch Environment Services and Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the BE margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the BE margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CD')">CD</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
C-Language Development Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the CD margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the CD margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CPT')">CPT</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Process CPU-Time Clocks <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the CPT margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the CPT margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CS')">CS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Clock Selection <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the CS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the CS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Extension to the ISO C standard <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is an extension to the ISO C standard. Application writers may make use of an extension as it is
|
|
supported on all IEEE Std 1003.1-2001-conforming systems.</p>
|
|
|
|
<p>With each function or header from the ISO C standard, a statement to the effect that "any conflict is unintentional" is
|
|
included. That is intended to refer to a direct conflict. IEEE Std 1003.1-2001 acts in part as a profile of the
|
|
ISO C standard, and it may choose to further constrain behaviors allowed to vary by the ISO C standard. Such limitations
|
|
are not considered conflicts.</p>
|
|
|
|
<p>Where additional semantics apply to a function or header, the material is identified by use of the CX margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('FD')">FD</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
FORTRAN Development Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the FD margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the FD margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('FR')">FR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
FORTRAN Runtime Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the FR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the FR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('FSC')">FSC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
File Synchronization <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the FSC margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the FSC margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('IP6')">IP6</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
IPV6 <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the IP6 margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the IP6 margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MC1')">MC1</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Advisory Information and either Memory Mapped Files or Shared Memory Objects <img src="../images/opt-end.gif" alt="[Option End]"
|
|
border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>This is a shorthand notation for combinations of multiple option codes.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MC1 margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MC1 margin legend.</p>
|
|
|
|
<p>Refer to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap01.html#tag_01_05_02">Section 1.5.2, Margin Code Notation</a>.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MC2')">MC2</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Memory Mapped Files, Shared Memory Objects, or Memory Protection <img src="../images/opt-end.gif" alt="[Option End]" border=
|
|
"0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>This is a shorthand notation for combinations of multiple option codes.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MC2 margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MC2 margin legend.</p>
|
|
|
|
<p>Refer to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap01.html#tag_01_05_02">Section 1.5.2, Margin Code Notation</a>.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MF')">MF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Memory Mapped Files <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MF margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MF margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Process Memory Locking <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the ML margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the ML margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MR')">MR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Range Memory Locking <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MLR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MLR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MON')">MON</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Monotonic Clock <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MON margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MON margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MPR')">MPR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Memory Protection <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MPR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MPR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Message Passing <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MSG margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MSG margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('MX')">MX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> IEC
|
|
60559 Floating-Point Option <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the MX margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the MX margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('OB')">OB</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Obsolescent <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described may be withdrawn in a future version of this volume of IEEE Std 1003.1-2001. Strictly
|
|
Conforming POSIX Applications and Strictly Conforming XSI Applications shall not use obsolescent features.</p>
|
|
|
|
<p>Where applicable, the material is identified by use of the OB margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('OF')">OF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Output Format Incompletely Specified <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is an XSI extension. The format of the output produced by the utility is not fully specified. It is
|
|
therefore not possible to post-process this output in a consistent fashion. Typical problems include unknown length of strings and
|
|
unspecified field delimiters.</p>
|
|
|
|
<p>Where applicable, the material is identified by use of the OF margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('OH')">OH</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Optional Header <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
In the SYNOPSIS section of some interfaces in the System Interfaces volume of IEEE Std 1003.1-2001 an included header is
|
|
marked as in the following example:</p>
|
|
|
|
<pre>
|
|
<tt><sup>[<a href="javascript:open_code('OH')">OH</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
#include <sys/types.h>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
|
|
#include <grp.h>
|
|
struct group *getgrnam(const char *name);
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>The OH margin legend indicates that the marked header is not required on XSI-conformant systems.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('PIO')">PIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Prioritized Input and Output <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the PIO margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the PIO margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('PS')">PS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Process Scheduling <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the PS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the PS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('RS')">RS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> Raw
|
|
Sockets <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the RS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the RS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('RTS')">RTS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Realtime Signals Extension <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the RTS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the RTS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SD')">SD</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Software Development Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the SD margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the SD margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SEM')">SEM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Semaphores <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SEM margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SEM margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SHM')">SHM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Shared Memory Objects <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SHM margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SHM margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SIO')">SIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Synchronized Input and Output <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SIO margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SIO margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SPI')">SPI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Spin Locks <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SPI margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SPI margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SPN')">SPN</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Spawn <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SPN margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SPN margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('SS')">SS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Process Sporadic Server <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the SS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the SS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TCT')">TCT</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread CPU-Time Clocks <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TCT margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TCT margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TEF')">TEF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Trace Event Filter <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TEF margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TEF margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Threads <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the THR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the THR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TMO')">TMO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Timeouts <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TMO margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TMO margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TMR')">TMR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Timers <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TMR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TMR margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TPI')">TPI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Priority Inheritance <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TPI margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TPI margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TPP')">TPP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Priority Protection <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TPP margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TPP margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TPS')">TPS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Execution Scheduling <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TPS margin legend for the SYNOPSIS section. Where additional semantics apply to
|
|
a function, the material is identified by use of the TPS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Trace <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TRC margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TRC margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Trace Inherit <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TRI margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TRI margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Trace Log <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TRL margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TRL margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TSA')">TSA</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Stack Address Attribute <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TSA margin legend for the SYNOPSIS section. Where additional semantics apply to
|
|
a function, the material is identified by use of the TSA margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TSF')">TSF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread-Safe Functions <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TSF margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TSF margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TSH')">TSH</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Process-Shared Synchronization <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TSH margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TSH margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TSP')">TSP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Sporadic Server <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TSP margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TSP margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TSS')">TSS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Thread Stack Address Size <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TSS margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TSS margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TYM')">TYM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Typed Memory Objects <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the TYM margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the TYM margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
User Portability Utilities <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional.</p>
|
|
|
|
<p>Where applicable, utilities are marked with the UP margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
utility, the material is identified by use of the UP margin legend.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Extension <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is an XSI extension. Functionality marked XSI is also an extension to the ISO C standard.
|
|
Application writers may confidently make use of an extension on all systems supporting the X/Open System Interfaces Extension.</p>
|
|
|
|
<p>If an entire SYNOPSIS section is shaded and marked XSI, all the functionality described in that reference page is an extension.
|
|
See the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap03.html#tag_03_439">Section 3.439,
|
|
XSI</a>.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('XSR')">XSR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
XSI STREAMS <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
The functionality described is optional. The functionality described is also an extension to the ISO C standard.</p>
|
|
|
|
<p>Where applicable, functions are marked with the XSR margin legend in the SYNOPSIS section. Where additional semantics apply to a
|
|
function, the material is identified by use of the XSR margin legend.</p>
|
|
|
|
<h3><a name="tag_01_09"></a>Utility Limits</h3>
|
|
|
|
<p>This section lists magnitude limitations imposed by a specific implementation. The braces notation, {LIMIT}, is used in this
|
|
volume of IEEE Std 1003.1-2001 to indicate these values, but the braces are not part of the name.</p>
|
|
|
|
<center><b><a name="tagtcjh_3"></a> Table: Utility Limit Minimum Values</b></center>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Name</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Description</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Value</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_BASE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum <i>obase</i> value allowed by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">99</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_DIM_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of elements permitted in an array by the <a href="../utilities/bc.html"><i>bc</i></a>
|
|
utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">2048</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_SCALE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum <i>scale</i> value allowed by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">99</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_STRING_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum length of a string constant accepted by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">1000</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_COLL_WEIGHTS_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of weights that can be assigned to an entry of the <i>LC_COLLATE</i> <b>order</b> keyword in the
|
|
locale definition file; see the <b>border_start</b> keyword in the Base Definitions volume of IEEE Std 1003.1-2001, <a
|
|
href="../basedefs/xbd_chap07.html#tag_07_03_02">Section 7.3.2, LC_COLLATE</a>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">2</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_EXPR_NEST_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of expressions that can be nested within parentheses by the <a href=
|
|
"../utilities/expr.html"><i>expr</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">32</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_LINE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Unless otherwise noted, the maximum length, in bytes, of the input line of a utility (either standard input or
|
|
another file), when the utility is described as processing text files. The length includes room for the trailing
|
|
<newline>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">2048</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_RE_DUP_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of repeated occurrences of a BRE permitted when using the interval notation
|
|
\{<i>m</i>,<i>n</i>\}; see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap09.html#tag_09_03_06">Section 9.3.6, BREs Matching Multiple Characters</a>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">255</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_VERSION}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">This value indicates the version of the utilities in this volume of IEEE Std 1003.1-2001 that are
|
|
provided by the implementation. It changes with each published version.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">200112L</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The values specified in <a href="#tagtcjh_3">Utility Limit Minimum Values</a> represent the lowest values conforming
|
|
implementations shall provide and, consequently, the largest values on which an application can rely without further enquiries, as
|
|
described below. These values shall be accessible to applications via the <a href="../utilities/getconf.html"><i>getconf</i></a>
|
|
utility (see <a href="getconf.html"><i>getconf</i></a> ) and through the <a href="../functions/sysconf.html"><i>sysconf</i>()</a>
|
|
function defined in the System Interfaces volume of IEEE Std 1003.1-2001. The literal names shown in <a href=
|
|
"#tagtcjh_3">Utility Limit Minimum Values</a> apply only to the <a href="../utilities/getconf.html"><i>getconf</i></a> utility; the
|
|
high-level language binding describes the exact form of each name to be used by the interfaces in that binding.</p>
|
|
|
|
<p>Implementations may provide more liberal, or less restrictive, values than shown in <a href="#tagtcjh_3">Utility Limit Minimum
|
|
Values</a> . These possibly more liberal values are accessible using the symbols in <a href="#tagtcjh_4">Symbolic Utility
|
|
Limits</a> .</p>
|
|
|
|
<p>The <a href="../functions/sysconf.html"><i>sysconf</i>()</a> function defined in the System Interfaces volume of
|
|
IEEE Std 1003.1-2001 or the <a href="../utilities/getconf.html"><i>getconf</i></a> utility return the value of each
|
|
symbol on each specific implementation. The value so retrieved is the largest, or most liberal, value that is available throughout
|
|
the session lifetime, as determined at session creation. The literal names shown in the table apply only to the <a href=
|
|
"../utilities/getconf.html"><i>getconf</i></a> utility; the high-level language binding describes the exact form of each name to be
|
|
used by the interfaces in that binding.</p>
|
|
|
|
<p>All numeric limits defined by the System Interfaces volume of IEEE Std 1003.1-2001, such as {PATH_MAX}, shall also
|
|
apply to this volume of IEEE Std 1003.1-2001. All the utilities defined by this volume of IEEE Std 1003.1-2001
|
|
are implicitly limited by these values, unless otherwise noted in the utility descriptions.</p>
|
|
|
|
<p>It is not guaranteed that the application can actually reach the specified limit of an implementation in any given case, or at
|
|
all, as a lack of virtual memory or other resources may prevent this. The limit value indicates only that the implementation does
|
|
not specifically impose any arbitrary, more restrictive limit.</p>
|
|
|
|
<center><b><a name="tagtcjh_4"></a> Table: Symbolic Utility Limits</b></center>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Name</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Description</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Minimum Value</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{BC_BASE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum <i>obase</i> value allowed by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_BASE_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{BC_DIM_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of elements permitted in an array by the <a href="../utilities/bc.html"><i>bc</i></a>
|
|
utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_DIM_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{BC_SCALE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum <i>scale</i> value allowed by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_SCALE_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{BC_STRING_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum length of a string constant accepted by the <a href="../utilities/bc.html"><i>bc</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_BC_STRING_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{COLL_WEIGHTS_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of weights that can be assigned to an entry of the <i>LC_COLLATE</i> <b>order</b> keyword in the
|
|
locale definition file; see the <b>order_start</b> keyword in the Base Definitions volume of IEEE Std 1003.1-2001, <a
|
|
href="../basedefs/xbd_chap07.html#tag_07_03_02">Section 7.3.2, LC_COLLATE</a>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_COLL_WEIGHTS_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{EXPR_NEST_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of expressions that can be nested within parentheses by the <a href=
|
|
"../utilities/expr.html"><i>expr</i></a> utility.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_EXPR_NEST_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{LINE_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">Unless otherwise noted, the maximum length, in bytes, of the input line of a utility (either standard input or
|
|
another file), when the utility is described as processing text files. The length includes room for the trailing
|
|
<newline>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_LINE_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">{RE_DUP_MAX}</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">The maximum number of repeated occurrences of a BRE permitted when using the interval notation
|
|
\{<i>m</i>,<i>n</i>\}; see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap09.html#tag_09_03_06">Section 9.3.6, BREs Matching Multiple Characters</a>.</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">{POSIX2_RE_DUP_MAX}</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The following value may be a constant within an implementation or may vary from one pathname to another.</p>
|
|
|
|
<dl compact>
|
|
<dt>{POSIX2_SYMLINKS}</dt>
|
|
|
|
<dd><br>
|
|
When referring to a directory, the system supports the creation of symbolic links within that directory; for non-directory files,
|
|
the meaning of {POSIX2_SYMLINKS} is undefined.</dd>
|
|
</dl>
|
|
|
|
<h3><a name="tag_01_10"></a>Grammar Conventions</h3>
|
|
|
|
<p>Portions of this volume of IEEE Std 1003.1-2001 are expressed in terms of a special grammar notation. It is used to
|
|
portray the complex syntax of certain program input. The grammar is based on the syntax used by the <a href=
|
|
"../utilities/yacc.html"><i>yacc</i></a> utility. However, it does not represent fully functional <a href=
|
|
"../utilities/yacc.html"><i>yacc</i></a> input, suitable for program use; the lexical processing and all semantic requirements are
|
|
described only in textual form. The grammar is not based on source used in any traditional implementation and has not been tested
|
|
with the semantic code that would normally be required to accompany it. Furthermore, there is no implication that the partial <a
|
|
href="../utilities/yacc.html"><i>yacc</i></a> code presented represents the most efficient, or only, means of supporting the
|
|
complex syntax within the utility. Implementations may use other programming languages or algorithms, as long as the syntax
|
|
supported is the same as that represented by the grammar.</p>
|
|
|
|
<p>The following typographical conventions are used in the grammar; they have no significance except to aid in reading.</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>The identifiers for the reserved words of the language are shown with a leading capital letter. (These are terminals in the
|
|
grammar; for example, <b>While</b>, <b>Case</b>.)</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The identifiers for terminals in the grammar are all named with uppercase letters and underscores; for example, <b>NEWLINE</b>,
|
|
<b>ASSIGN_OP</b>, <b>NAME</b>.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The identifiers for non-terminals are all lowercase.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3><a name="tag_01_11"></a>Utility Description Defaults</h3>
|
|
|
|
<p>This section describes all of the subsections used within the utility descriptions, including:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Intended usage of the section</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Global defaults that affect all the standard utilities</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The meanings of notations used in this volume of IEEE Std 1003.1-2001 that are specific to individual utility
|
|
sections</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<dl compact>
|
|
<dt><b>NAME</b></dt>
|
|
|
|
<dd><br>
|
|
This section gives the name or names of the utility and briefly states its purpose.</dd>
|
|
|
|
<dt><b>SYNOPSIS</b></dt>
|
|
|
|
<dd><br>
|
|
The SYNOPSIS section summarizes the syntax of the calling sequence for the utility, including options, option-arguments, and
|
|
operands. Standards for utility naming are described in the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>; for describing the utility's arguments in the
|
|
Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_01">Section 12.1, Utility
|
|
Argument Syntax</a>.</dd>
|
|
|
|
<dt><b>DESCRIPTION</b></dt>
|
|
|
|
<dd><br>
|
|
The DESCRIPTION section describes the actions of the utility. If the utility has a very complex set of subcommands or its own
|
|
procedural language, an EXTENDED DESCRIPTION section is also provided. Most explanations of optional functionality are omitted
|
|
here, as they are usually explained in the OPTIONS section.
|
|
|
|
<p>As stated in <a href="#tag_01_07_01_11">Actions Equivalent to Functions</a> , some functions are described in terms of
|
|
equivalent functionality. When specific functions are cited, the implementation shall provide equivalent functionality including
|
|
side effects associated with successful execution of the function. The treatment of errors and intermediate results from the
|
|
individual functions cited is generally not specified by this volume of IEEE Std 1003.1-2001. See the utility's EXIT
|
|
STATUS and CONSEQUENCES OF ERRORS sections for all actions associated with errors encountered by the utility.</p>
|
|
</dd>
|
|
|
|
<dt><b>OPTIONS</b></dt>
|
|
|
|
<dd><br>
|
|
The OPTIONS section describes the utility options and option-arguments, and how they modify the actions of the utility. Standard
|
|
utilities that have options either fully comply with the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a> or describe all deviations. Apparent
|
|
disagreements between functionality descriptions in the OPTIONS and DESCRIPTION (or EXTENDED DESCRIPTION) sections are always
|
|
resolved in favor of the OPTIONS section.
|
|
|
|
<p>Each OPTIONS section that uses the phrase "The ... utility shall conform to the Utility Syntax Guidelines ..." refers only to
|
|
the use of the utility as specified by this volume of IEEE Std 1003.1-2001; implementation extensions should also conform
|
|
to the guidelines, but may allow exceptions for historical practice.</p>
|
|
|
|
<p>Unless otherwise stated in the utility description, when given an option unrecognized by the implementation, or when a required
|
|
option-argument is not provided, standard utilities shall issue a diagnostic message to standard error and exit with a non-zero
|
|
exit status.</p>
|
|
|
|
<p>All utilities in this volume of IEEE Std 1003.1-2001 shall be capable of processing arguments using eight-bit
|
|
transparency.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", it means that the implementation need not support any
|
|
options. Standard utilities that do not accept options, but that do accept operands, shall recognize <tt>"--"</tt> as a first
|
|
argument to be discarded.</p>
|
|
|
|
<p>The requirement for recognizing <tt>"--"</tt> is because conforming applications need a way to shield their operands from any
|
|
arbitrary options that the implementation may provide as an extension. For example, if the standard utility <i>foo</i> is listed as
|
|
taking no options, and the application needed to give it a pathname with a leading hyphen, it could safely do it as:</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<tt>foo -- -myfile
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p>and avoid any problems with <b>-m</b> used as an extension.</p>
|
|
</dd>
|
|
|
|
<dt><b>OPERANDS</b></dt>
|
|
|
|
<dd><br>
|
|
The OPERANDS section describes the utility operands, and how they affect the actions of the utility. Apparent disagreements between
|
|
functionality descriptions in the OPERANDS and DESCRIPTION (or EXTENDED DESCRIPTION) sections shall be resolved in favor of the
|
|
OPERANDS section.
|
|
|
|
<p>If an operand naming a file can be specified as <tt>'-'</tt> , which means to use the standard input instead of a named file,
|
|
this is explicitly stated in this section. Unless otherwise stated, the use of multiple instances of <tt>'-'</tt> to mean standard
|
|
input in a single command produces unspecified results.</p>
|
|
|
|
<p>Unless otherwise stated, the standard utilities that accept operands shall process those operands in the order specified in the
|
|
command line.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", it means that the implementation need not support any
|
|
operands.</p>
|
|
</dd>
|
|
|
|
<dt><b>STDIN</b></dt>
|
|
|
|
<dd><br>
|
|
The STDIN section describes the standard input of the utility. This section is frequently merely a reference to the following
|
|
section, as many utilities treat standard input and input files in the same manner. Unless otherwise stated, all restrictions
|
|
described in the INPUT FILES section shall apply to this section as well.
|
|
|
|
<p>Use of a terminal for standard input can cause any of the standard utilities that read standard input to stop when used in the
|
|
background. For this reason, applications should not use interactive features in scripts to be placed in the background.</p>
|
|
|
|
<p>The specified standard input format of the standard utilities shall not depend on the existence or value of the environment
|
|
variables defined in this volume of IEEE Std 1003.1-2001, except as provided by this volume of
|
|
IEEE Std 1003.1-2001.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "Not used.", it means that the standard input shall not be read when
|
|
the utility is used as described by this volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>INPUT FILES</b></dt>
|
|
|
|
<dd><br>
|
|
The INPUT FILES section describes the files, other than the standard input, used as input by the utility. It includes files named
|
|
as operands and option-arguments as well as other files that are referred to, such as start-up and initialization files, databases,
|
|
and so on. Commonly-used files are generally described in one place and cross-referenced by other utilities.
|
|
|
|
<p>All utilities in this volume of IEEE Std 1003.1-2001 shall be capable of processing input files using eight-bit
|
|
transparency.</p>
|
|
|
|
<p>When a standard utility reads a seekable input file and terminates without an error before it reaches end-of-file, the utility
|
|
shall ensure that the file offset in the open file description is properly positioned just past the last byte processed by the
|
|
utility. For files that are not seekable, the state of the file offset in the open file description for that file is unspecified. A
|
|
conforming application shall not assume that the following three commands are equivalent:</p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
<tt>tail -n +2 file
|
|
(sed -n 1q; cat) < file
|
|
cat file | (sed -n 1q; cat)
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p>The second command is equivalent to the first only when the file is seekable. The third command leaves the file offset in the
|
|
open file description in an unspecified state. Other utilities, such as <a href="../utilities/head.html"><i>head</i></a>, <a href=
|
|
"../utilities/read.html"><i>read</i></a>, and <a href="../utilities/sh.html"><i>sh</i></a>, have similar properties.</p>
|
|
|
|
<p>Some of the standard utilities, such as filters, process input files a line or a block at a time and have no restrictions on the
|
|
maximum input file size. Some utilities may have size limitations that are not as obvious as file space or memory limitations. Such
|
|
limitations should reflect resource limitations of some sort, not arbitrary limits set by implementors. Implementations shall
|
|
document those utilities that are limited by constraints other than file system space, available memory, and other limits
|
|
specifically cited by this volume of IEEE Std 1003.1-2001, and identify what the constraint is and indicate a way of
|
|
estimating when the constraint would be reached. Similarly, some utilities descend the directory tree (recursively).
|
|
Implementations shall also document any limits that they may have in descending the directory tree that are beyond limits cited by
|
|
this volume of IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>When an input file is described as a "text file", the utility produces undefined results if given input that is not from a
|
|
text file, unless otherwise stated. Some utilities (for example, <a href="../utilities/make.html"><i>make</i></a>, <a href=
|
|
"../utilities/read.html"><i>read</i></a>, <a href="../utilities/sh.html"><i>sh</i></a>) allow for continued input lines using an
|
|
escaped <newline> convention; unless otherwise stated, the utility need not be able to accumulate more than {LINE_MAX} bytes
|
|
from a set of multiple, continued input lines. Thus, for a conforming application the total of all the continued lines in a set
|
|
cannot exceed {LINE_MAX}. If a utility using the escaped <newline> convention detects an end-of-file condition immediately
|
|
after an escaped <newline>, the results are unspecified.</p>
|
|
|
|
<p>Record formats are described in a notation similar to that used by the C-language function, <a href=
|
|
"../functions/printf.html"><i>printf</i>()</a>. See the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap05.html">Chapter 5, File Format Notation</a> for a description of this notation. The format description is
|
|
intended to be sufficiently rigorous to allow other applications to generate these input files. However, since <blank>s can
|
|
legitimately be included in some of the fields described by the standard utilities, particularly in locales other than the POSIX
|
|
locale, this intent is not always realized.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", it means that no input files are required to be supplied when
|
|
the utility is used as described by this volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>ENVIRONMENT VARIABLES</b></dt>
|
|
|
|
<dd><br>
|
|
The ENVIRONMENT VARIABLES section lists what variables affect the utility's execution.
|
|
|
|
<p>The entire manner in which environment variables described in this volume of IEEE Std 1003.1-2001 affect the behavior
|
|
of each utility is described in the ENVIRONMENT VARIABLES section for that utility, in conjunction with the global effects of the
|
|
<i>LANG ,</i> <i>LC_ALL ,</i> and <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif"
|
|
alt="[Option Start]" border="0"> <i>NLSPATH</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"> environment
|
|
variables described in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html">Chapter
|
|
8, Environment Variables</a>. The existence or value of environment variables described in this volume of
|
|
IEEE Std 1003.1-2001 shall not otherwise affect the specified behavior of the standard utilities. Any effects of the
|
|
existence or value of environment variables not described by this volume of IEEE Std 1003.1-2001 upon the standard
|
|
utilities are unspecified.</p>
|
|
|
|
<p>For those standard utilities that use environment variables as a means for selecting a utility to execute (such as <i>CC</i> in
|
|
<a href="../utilities/make.html"><i>make</i></a>), the string provided to the utility is subjected to the path search described for
|
|
<i>PATH</i> in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html">Chapter 8,
|
|
Environment Variables</a>.</p>
|
|
|
|
<p>All utilities in this volume of IEEE Std 1003.1-2001 shall be capable of processing environment variable names and
|
|
values using eight-bit transparency.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", it means that the behavior of the utility is not directly
|
|
affected by environment variables described by this volume of IEEE Std 1003.1-2001 when the utility is used as described
|
|
by this volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>ASYNCHRONOUS EVENTS</b></dt>
|
|
|
|
<dd><br>
|
|
The ASYNCHRONOUS EVENTS section lists how the utility reacts to such events as signals and what signals are caught.
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "Default.", or it refers to "the standard action for all other
|
|
signals; see <a href="#tag_01_11">Utility Description Defaults</a> " it means that the action taken as a result of the signal
|
|
shall be one of the following:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>The action shall be that inherited from the parent according to the rules of inheritance of signal actions defined in the System
|
|
Interfaces volume of IEEE Std 1003.1-2001.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>When no action has been taken to change the default, the default action shall be that specified by the System Interfaces volume
|
|
of IEEE Std 1003.1-2001.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The result of the utility's execution is as if default actions had been taken.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>A utility is permitted to catch a signal, perform some additional processing (such as deleting temporary files), restore the
|
|
default signal action (or action inherited from the parent process), and resignal itself.</p>
|
|
</dd>
|
|
|
|
<dt><b>STDOUT</b></dt>
|
|
|
|
<dd><br>
|
|
The STDOUT section completely describes the standard output of the utility. This section is frequently merely a reference to the
|
|
following section, OUTPUT FILES, because many utilities treat standard output and output files in the same manner.
|
|
|
|
<p>Use of a terminal for standard output may cause any of the standard utilities that write standard output to stop when used in
|
|
the background. For this reason, applications should not use interactive features in scripts to be placed in the background.</p>
|
|
|
|
<p>Record formats are described in a notation similar to that used by the C-language function, <a href=
|
|
"../functions/printf.html"><i>printf</i>()</a>. See the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap05.html">Chapter 5, File Format Notation</a> for a description of this notation.</p>
|
|
|
|
<p>The specified standard output of the standard utilities shall not depend on the existence or value of the environment variables
|
|
defined in this volume of IEEE Std 1003.1-2001, except as provided by this volume of IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>Some of the standard utilities describe their output using the verb <i>display</i>, defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap03.html#tag_03_132">Section 3.132, Display</a>. Output described in
|
|
the STDOUT sections of such utilities may be produced using means other than standard output. When standard output is directed to a
|
|
terminal, the output described shall be written directly to the terminal. Otherwise, the results are undefined.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "Not used.", it means that the standard output shall not be written
|
|
when the utility is used as described by this volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>STDERR</b></dt>
|
|
|
|
<dd><br>
|
|
The STDERR section describes the standard error output of the utility. Only those messages that are purposely sent by the utility
|
|
are described.
|
|
|
|
<p>Use of a terminal for standard error may cause any of the standard utilities that write standard error output to stop when used
|
|
in the background. For this reason, applications should not use interactive features in scripts to be placed in the background.</p>
|
|
|
|
<p>The format of diagnostic messages for most utilities is unspecified, but the language and cultural conventions of diagnostic and
|
|
informative messages whose format is unspecified by this volume of IEEE Std 1003.1-2001 should be affected by the setting
|
|
of <i>LC_MESSAGES</i> and <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> <i>NLSPATH .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
|
|
|
<p>The specified standard error output of standard utilities shall not depend on the existence or value of the environment
|
|
variables defined in this volume of IEEE Std 1003.1-2001, except as provided by this volume of
|
|
IEEE Std 1003.1-2001.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "The standard error shall be used only for diagnostic messages.", it
|
|
means that, unless otherwise stated, the diagnostic messages shall be sent to the standard error only when the exit status is
|
|
non-zero and the utility is used as described by this volume of IEEE Std 1003.1-2001.</p>
|
|
|
|
<p>When this section is listed as "Not used.", it means that the standard error shall not be used when the utility is used as
|
|
described in this volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>OUTPUT FILES</b></dt>
|
|
|
|
<dd><br>
|
|
The OUTPUT FILES section completely describes the files created or modified by the utility. Temporary or system files that are
|
|
created for internal usage by this utility or other parts of the implementation (for example, spool, log, and audit files) are not
|
|
described in this, or any, section. The utilities creating such files and the names of such files are unspecified. If applications
|
|
are written to use temporary or intermediate files, they should use the <i>TMPDIR</i> environment variable, if it is set and
|
|
represents an accessible directory, to select the location of temporary files.
|
|
|
|
<p>Implementations shall ensure that temporary files, when used by the standard utilities, are named so that different utilities or
|
|
multiple instances of the same utility can operate simultaneously without regard to their working directories, or any other process
|
|
characteristic other than process ID. There are two exceptions to this rule:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Resources for temporary files other than the name space (for example, disk space, available directory entries, or number of
|
|
processes allowed) are not guaranteed.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Certain standard utilities generate output files that are intended as input for other utilities (for example, <a href=
|
|
"../utilities/lex.html"><i>lex</i></a> generates <b>lex.yy.c</b>), and these cannot have unique names. These cases are explicitly
|
|
identified in the descriptions of the respective utilities.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>Any temporary file created by the implementation shall be removed by the implementation upon a utility's successful exit, exit
|
|
because of errors, or before termination by any of the SIGHUP, SIGINT, or SIGTERM signals, unless specified otherwise by the
|
|
utility description.</p>
|
|
|
|
<p>Receipt of the SIGQUIT signal should generally cause termination (unless in some debugging mode) that would bypass any attempted
|
|
recovery actions.</p>
|
|
|
|
<p>Record formats are described in a notation similar to that used by the C-language function, <a href=
|
|
"../functions/printf.html"><i>printf</i>()</a>; see the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap05.html">Chapter 5, File Format Notation</a> for a description of this notation.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", it means that no files are created or modified as a
|
|
consequence of direct action on the part of the utility when the utility is used as described by this volume of
|
|
IEEE Std 1003.1-2001. However, the utility may create or modify system files, such as log files, that are outside the
|
|
utility's normal execution environment.</p>
|
|
</dd>
|
|
|
|
<dt><b>EXTENDED DESCRIPTION</b></dt>
|
|
|
|
<dd><br>
|
|
The EXTENDED DESCRIPTION section provides a place for describing the actions of very complicated utilities, such as text editors or
|
|
language processors, which typically have elaborate command languages.
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "None.", no further description is necessary.</p>
|
|
</dd>
|
|
|
|
<dt><b>EXIT STATUS</b></dt>
|
|
|
|
<dd><br>
|
|
The EXIT STATUS section describes the values the utility shall return to the calling program, or shell, and the conditions that
|
|
cause these values to be returned. Usually, utilities return zero for successful completion and values greater than zero for
|
|
various error conditions. If specific numeric values are listed in this section, the system shall use those values for the errors
|
|
described. In some cases, status values are listed more loosely, such as >0. A strictly conforming application shall not rely on
|
|
any specific value in the range shown and shall be prepared to receive any value in the range.
|
|
|
|
<p>For example, a utility may list zero as a successful return, 1 as a failure for a specific reason, and >1 as "an error
|
|
occurred". In this case, unspecified conditions may cause a 2 or 3, or other value, to be returned. A conforming application
|
|
should be written so that it tests for successful exit status values (zero in this case), rather than relying upon the single
|
|
specific error value listed in this volume of IEEE Std 1003.1-2001. In that way, it has maximum portability, even on
|
|
implementations with extensions.</p>
|
|
|
|
<p>Unspecified error conditions may be represented by specific values not listed in this volume of
|
|
IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>CONSEQUENCES OF ERRORS</b></dt>
|
|
|
|
<dd><br>
|
|
The CONSEQUENCES OF ERRORS section describes the effects on the environment, file systems, process state, and so on, when error
|
|
conditions occur. It does not describe error messages produced or exit status values used.
|
|
|
|
<p>The many reasons for failure of a utility are generally not specified by the utility descriptions. Utilities may terminate
|
|
prematurely if they encounter: invalid usage of options, arguments, or environment variables; invalid usage of the complex syntaxes
|
|
expressed in EXTENDED DESCRIPTION sections; difficulties accessing, creating, reading, or writing files; or difficulties associated
|
|
with the privileges of the process.</p>
|
|
|
|
<p>The following shall apply to each utility, unless otherwise stated:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>If the requested action cannot be performed on an operand representing a file, directory, user, process, and so on, the utility
|
|
shall issue a diagnostic message to standard error and continue processing the next operand in sequence, but the final exit status
|
|
shall be returned as non-zero.</p>
|
|
|
|
<p>For a utility that recursively traverses a file hierarchy (such as <a href="../utilities/find.html"><i>find</i></a> or <a href=
|
|
"../utilities/chown.html"><i>chown</i></a> <b>-R</b>), if the requested action cannot be performed on a file or directory
|
|
encountered in the hierarchy, the utility shall issue a diagnostic message to standard error and continue processing the remaining
|
|
files in the hierarchy, but the final exit status shall be returned as non-zero.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>If the requested action characterized by an option or option-argument cannot be performed, the utility shall issue a diagnostic
|
|
message to standard error and the exit status returned shall be non-zero.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>When an unrecoverable error condition is encountered, the utility shall exit with a non-zero exit status.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>A diagnostic message shall be written to standard error whenever an error condition occurs.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>When a utility encounters an error condition several actions are possible, depending on the severity of the error and the state
|
|
of the utility. Included in the possible actions of various utilities are: deletion of temporary or intermediate work files;
|
|
deletion of incomplete files; validity checking of the file system or directory.</p>
|
|
|
|
<p><b>Default Behavior:</b> When this section is listed as "Default.", it means that any changes to the environment are
|
|
unspecified.</p>
|
|
</dd>
|
|
|
|
<dt><b>APPLICATION USAGE</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>The APPLICATION USAGE section gives advice to the application programmer or user about the way the utility should be used.</p>
|
|
</dd>
|
|
|
|
<dt><b>EXAMPLES</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>The EXAMPLES section gives one or more examples of usage, where appropriate. In the event of conflict between an example and a
|
|
normative part of the specification, the normative material is to be taken as correct.</p>
|
|
|
|
<p>In all examples, quoting has been used, showing how sample commands (utility names combined with arguments) could be passed
|
|
correctly to a shell (see <a href="../utilities/sh.html"><i>sh</i></a>) or as a string to the <a href=
|
|
"../functions/system.html"><i>system</i>()</a> function defined in the System Interfaces volume of IEEE Std 1003.1-2001.
|
|
Such quoting would not be used if the utility is invoked using one of the <i>exec</i> functions defined in the System Interfaces
|
|
volume of IEEE Std 1003.1-2001.</p>
|
|
</dd>
|
|
|
|
<dt><b>RATIONALE</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>This section contains historical information concerning the contents of this volume of IEEE Std 1003.1-2001 and why
|
|
features were included or discarded by the standard developers.</p>
|
|
</dd>
|
|
|
|
<dt><b>FUTURE DIRECTIONS</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>The FUTURE DIRECTIONS section should be used as a guide to current thinking; there is not necessarily a commitment to implement
|
|
all of these future directions in their entirety.</p>
|
|
</dd>
|
|
|
|
<dt><b>SEE ALSO</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>The SEE ALSO section lists related entries.</p>
|
|
</dd>
|
|
|
|
<dt><b>CHANGE HISTORY</b></dt>
|
|
|
|
<dd><br>
|
|
This section is informative.
|
|
|
|
<p>This section shows the derivation of the entry and any significant changes that have been made to it.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Certain of the standard utilities describe how they can invoke other utilities or applications, such as by passing a command
|
|
string to the command interpreter. The external influences (STDIN, ENVIRONMENT VARIABLES, and so on) and external effects (STDOUT,
|
|
CONSEQUENCES OF ERRORS, and so on) of such invoked utilities are not described in the section concerning the standard utility that
|
|
invokes them.</p>
|
|
|
|
<h3><a name="tag_01_12"></a>Considerations for Utilities in Support of Files of Arbitrary Size</h3>
|
|
|
|
<p>The following utilities support files of any size up to the maximum that can be created by the implementation. This support
|
|
includes correct writing of file size-related values (such as file sizes and offsets, line numbers, and block counts) and correct
|
|
interpretation of command line arguments that contain such values.</p>
|
|
|
|
<dl compact>
|
|
<dt><i>basename</i></dt>
|
|
|
|
<dd>Return non-directory portion of pathname.</dd>
|
|
|
|
<dt><i>cat</i></dt>
|
|
|
|
<dd>Concatenate and print files.</dd>
|
|
|
|
<dt><i>cd</i></dt>
|
|
|
|
<dd>Change working directory.</dd>
|
|
|
|
<dt><i>chgrp</i></dt>
|
|
|
|
<dd>Change file group ownership.</dd>
|
|
|
|
<dt><i>chmod</i></dt>
|
|
|
|
<dd>Change file modes.</dd>
|
|
|
|
<dt><i>chown</i></dt>
|
|
|
|
<dd>Change file ownership.</dd>
|
|
|
|
<dt><i>cksum</i></dt>
|
|
|
|
<dd>Write file checksums and sizes.</dd>
|
|
|
|
<dt><i>cmp</i></dt>
|
|
|
|
<dd>Compare two files.</dd>
|
|
|
|
<dt><i>cp</i></dt>
|
|
|
|
<dd>Copy files.</dd>
|
|
|
|
<dt><i>dd</i></dt>
|
|
|
|
<dd>Convert and copy a file.</dd>
|
|
|
|
<dt><i>df</i></dt>
|
|
|
|
<dd>Report free disk space.</dd>
|
|
|
|
<dt><i>dirname</i></dt>
|
|
|
|
<dd>Return directory portion of pathname.</dd>
|
|
|
|
<dt><i>du</i></dt>
|
|
|
|
<dd>Estimate file space usage.</dd>
|
|
|
|
<dt><i>find</i></dt>
|
|
|
|
<dd>Find files.</dd>
|
|
|
|
<dt><i>ln</i></dt>
|
|
|
|
<dd>Link files.</dd>
|
|
|
|
<dt><i>ls</i></dt>
|
|
|
|
<dd>List directory contents.</dd>
|
|
|
|
<dt><i>mkdir</i></dt>
|
|
|
|
<dd>Make directories.</dd>
|
|
|
|
<dt><i>mv</i></dt>
|
|
|
|
<dd>Move files.</dd>
|
|
|
|
<dt><i>pathchk</i></dt>
|
|
|
|
<dd>Check pathnames.</dd>
|
|
|
|
<dt><i>pwd</i></dt>
|
|
|
|
<dd>Return working directory name.</dd>
|
|
|
|
<dt><i>rm</i></dt>
|
|
|
|
<dd>Remove directory entries.</dd>
|
|
|
|
<dt><i>rmdir</i></dt>
|
|
|
|
<dd>Remove directories.</dd>
|
|
|
|
<dt><i>sh</i></dt>
|
|
|
|
<dd>Shell, the standard command language interpreter.</dd>
|
|
|
|
<dt><i>sum</i></dt>
|
|
|
|
<dd>Print checksum and block or byte count of a file.</dd>
|
|
|
|
<dt><i>test</i></dt>
|
|
|
|
<dd>Evaluate expression.</dd>
|
|
|
|
<dt><i>touch</i></dt>
|
|
|
|
<dd>Change file access and modification times.</dd>
|
|
|
|
<dt><i>ulimit</i></dt>
|
|
|
|
<dd>Set or report file size limit.</dd>
|
|
</dl>
|
|
|
|
<p>Exceptions to the requirement that utilities support files of any size up to the maximum are as follows:</p>
|
|
|
|
<ol>
|
|
<li>
|
|
<p>Uses of files as command scripts, or for configuration or control, are exempt. For example, it is not required that <a href=
|
|
"../utilities/sh.html"><i>sh</i></a> be able to read an arbitrarily large <b>.profile</b>.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Shell input and output redirection are exempt. For example, it is not required that the redirections <i>sum</i> < <i>file</i>
|
|
or <i>echo foo</i> > <i>file</i> succeed for an arbitrarily large existing file.</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<h3><a name="tag_01_13"></a>Built-In Utilities</h3>
|
|
|
|
<p>Any of the standard utilities may be implemented as regular built-in utilities within the command language interpreter. This is
|
|
usually done to increase the performance of frequently used utilities or to achieve functionality that would be more difficult in a
|
|
separate environment. The utilities named in <a href="#tagtcjh_5">Regular Built-In Utilities</a> are frequently provided in
|
|
built-in form. All of the utilities named in the table have special properties in terms of command search order within the shell,
|
|
as described in <a href="xcu_chap02.html#tag_02_09_01_01"><i>Command Search and Execution</i></a> .</p>
|
|
|
|
<center><b><a name="tagtcjh_5"></a> Table: Regular Built-In Utilities</b></center>
|
|
|
|
<center>
|
|
<table cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><br>
|
|
<a href="../utilities/alias.html"><i>alias</i></a><br>
|
|
<a href="../utilities/bg.html"><i>bg</i></a><br>
|
|
<a href="../utilities/cd.html"><i>cd</i></a><br>
|
|
<a href="../utilities/command.html"><i>command</i></a><br>
|
|
</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><br>
|
|
<a href="../utilities/false.html"><i>false</i></a><br>
|
|
<a href="../utilities/fc.html"><i>fc</i></a><br>
|
|
<a href="../utilities/fg.html"><i>fg</i></a><br>
|
|
<a href="../utilities/getopts.html"><i>getopts</i></a><br>
|
|
</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><br>
|
|
<a href="../utilities/jobs.html"><i>jobs</i></a><br>
|
|
<a href="../utilities/kill.html"><i>kill</i></a><br>
|
|
<a href="../utilities/newgrp.html"><i>newgrp</i></a><br>
|
|
<a href="../utilities/pwd.html"><i>pwd</i></a><br>
|
|
</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><br>
|
|
<a href="../utilities/read.html"><i>read</i></a><br>
|
|
<a href="../utilities/true.html"><i>true</i></a><br>
|
|
<a href="../utilities/umask.html"><i>umask</i></a><br>
|
|
<a href="../utilities/unalias.html"><i>unalias</i></a><br>
|
|
</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><br>
|
|
<a href="../utilities/wait.html"><i>wait</i></a><br>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>However, all of the standard utilities, including the regular built-ins in the table, but not the special built-ins described in
|
|
<a href="xcu_chap02.html#tag_02_14"><i>Special Built-In Utilities</i></a> , shall be implemented in a manner so that they can be
|
|
accessed via the <i>exec</i> family of functions as defined in the System Interfaces volume of IEEE Std 1003.1-2001 and
|
|
can be invoked directly by those standard utilities that require it ( <a href="../utilities/env.html"><i>env</i></a>, <a href=
|
|
"../utilities/find.html"><i>find</i></a>, <a href="../utilities/nice.html"><i>nice</i></a>, <a href=
|
|
"../utilities/nohup.html"><i>nohup</i></a>, <a href="../utilities/time.html"><i>time</i></a>, <a href=
|
|
"../utilities/xargs.html"><i>xargs</i></a>).</p>
|
|
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|