📄 port.html
字号:
<li><p>Complex Data Manipulation</p></li><li><p>File Hierarchy Manipulation</p></li><li><p>Locale Configuration</p></li><li><p>Inter-User Communication</p></li><li><p>System Environment</p></li><li><p>Printing</p></li><li><p>Software Development</p></li></ul><h4><a name="tag_04_02_01"></a>Configuration Interrogation</h4><p>The <a href="../functions/uname.html"><i>uname</i>()</a> operation provides basic identification of the system. The <a href="../functions/sysconf.html"><i>sysconf</i>()</a>, <a href="../functions/pathconf.html"><i>pathconf</i>()</a>, and <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a> functions and the <a href="../utilities/getconf.html"><i>getconf</i></a>utility provide means to interrogate the implementation to determine how to adapt to the environment in which it is running. Thesevalues can be either static (indicating that all instances of the implementation have the same value) or dynamic (indicating thatdifferent instances of the implementation have the different values, or that the value may vary for other reasons, such asreconfiguration).</p><h5><a name="tag_04_02_01_01"></a>Unsatisfied Requirements</h5><p>None directly. However, as new areas are added, there will be a need for additional capability in this area.</p><h4><a name="tag_04_02_02"></a>Process Management</h4><p>The <a href="../functions/fork.html"><i>fork</i>()</a>, <i>exec</i> family, <a href="../functions/posix_spawn.html"><i>posix_spawn</i>()</a>, and <a href="../functions/posix_spawnp.html"><i>posix_spawnp</i>()</a>functions provide for the creation of new processes or the insertion of new applications into existing processes. The <a href="../functions/_Exit.html"><i>_Exit</i>()</a>, <a href="../functions/_exit.html"><i>_exit</i>()</a>, <a href="../functions/exit.html"><i>exit</i>()</a>, and <a href="../functions/abort.html"><i>abort</i>()</a> functions allow for thetermination of a process by itself. The <a href="../functions/wait.html"><i>wait</i>()</a> and <a href="../functions/waitpid.html"><i>waitpid</i>()</a> functions allow one process to deal with the termination of another.</p><p>The <a href="../functions/times.html"><i>times</i>()</a> function allows for basic measurement of times used by a process.Various functions, including <a href="../functions/fstat.html"><i>fstat</i>()</a>, <a href="../functions/getegid.html"><i>getegid</i>()</a>, <a href="../functions/geteuid.html"><i>geteuid</i>()</a>, <a href="../functions/getgid.html"><i>getgid</i>()</a>, <a href="../functions/getgrgid.html"><i>getgrgid</i>()</a>, <a href="../functions/getgrnam.html"><i>getgrnam</i>()</a>, <a href="../functions/getlogin.html"><i>getlogin</i>()</a>, <a href="../functions/getpid.html"><i>getpid</i>()</a>, <a href="../functions/getppid.html"><i>getppid</i>()</a>, <a href="../functions/getpwnam.html"><i>getpwnam</i>()</a>, <a href="../functions/getpwuid.html"><i>getpwuid</i>()</a>, <a href="../functions/getuid.html"><i>getuid</i>()</a>, <a href="../functions/lstat.html"><i>lstat</i>()</a>, and <a href="../functions/stat.html"><i>stat</i>()</a>, provide for access to the identifiers of processes and the identifiers and names ofowners of processes (and files).</p><p>The various functions operating on environment variables provide for communication of information (primarily user-configurabledefaults) from a parent to child processes.</p><p>The operations on the current working directory control and interrogate the directory from which relative filename searchesstart. The <a href="../functions/umask.html"><i>umask</i>()</a> function controls the default protections applied to files createdby the process.</p><p>The <a href="../functions/alarm.html"><i>alarm</i>()</a>, <a href="../functions/pause.html"><i>pause</i>()</a>, <a href="../functions/sleep.html"><i>sleep</i>()</a>, <a href="../functions/ualarm.html"><i>ualarm</i>()</a>, and <a href="../functions/usleep.html"><i>usleep</i>()</a> operations allow the process to suspend until a timer has expired or to be notifiedwhen a period of time has elapsed. The <a href="../functions/time.html"><i>time</i>()</a> operation interrogates the current timeand date.</p><p>The signal mechanism provides for communication of events either from other processes or from the environment to theapplication, and the means for the application to control the effect of these events. The mechanism provides for externaltermination of a process and for a process to suspend until an event occurs. The mechanism also provides for a value to beassociated with an event.</p><p>Job control provides a means to group processes and control them as groups, and to control their access to the function betweenthe user and the system (the "controlling terminal"). It also provides the means to suspend and resume processes.</p><p>The Process Scheduling option provides control of the scheduling and priority of a process.</p><p>The Message Passing option provides a means for interprocess communication involving small amounts of data.</p><p>The Memory Management facilities provide control of memory resources and for the sharing of memory. This functionality ismandatory on XSI-conformant systems.</p><p>The Threads facilities provide multiple flows of control with a process (threads), synchronization between threads, associationof data with threads, and controlled cancellation of threads.</p><p>The XSI interprocess communications functionality provide an alternate set of facilities to manipulate semaphores, messagequeues, and shared memory. These are provided on XSI-conformant systems to support conforming applications developed to run on UNIXsystems.</p><h4><a name="tag_04_02_03"></a>Access to Data</h4><p>The <a href="../functions/open.html"><i>open</i>()</a>, <a href="../functions/close.html"><i>close</i>()</a>, <a href="../functions/fclose.html"><i>fclose</i>()</a>, <a href="../functions/fopen.html"><i>fopen</i>()</a>, and <a href="../functions/pipe.html"><i>pipe</i>()</a> functions provide for access to files and data. Such files may be regular files,interprocess data channels (pipes), or devices. Additional types of objects in the file system are permitted and are beingcontemplated for standardization.</p><p>The <a href="../functions/access.html"><i>access</i>()</a>, <a href="../functions/chmod.html"><i>chmod</i>()</a>, <a href="../functions/chown.html"><i>chown</i>()</a>, <a href="../functions/dup.html"><i>dup</i>()</a>, <a href="../functions/dup2.html"><i>dup2</i>()</a>, <a href="../functions/fchmod.html"><i>fchmod</i>()</a>, <a href="../functions/fcntl.html"><i>fcntl</i>()</a>, <a href="../functions/fstat.html"><i>fstat</i>()</a>, <a href="../functions/ftruncate.html"><i>ftruncate</i>()</a>, <a href="../functions/lstat.html"><i>lstat</i>()</a>, <a href="../functions/readlink.html"><i>readlink</i>()</a>, <a href="../functions/realpath.html"><i>realpath</i>()</a>, <a href="../functions/stat.html"><i>stat</i>()</a>, and <a href="../functions/utime.html"><i>utime</i>()</a> functions allow for controland interrogation of file and file-related objects (including symbolic links), and their ownership, protections, andtimestamps.</p><p>The <a href="../functions/fgetc.html"><i>fgetc</i>()</a>, <a href="../functions/fputc.html"><i>fputc</i>()</a>, <a href="../functions/fread.html"><i>fread</i>()</a>, <a href="../functions/fseek.html"><i>fseek</i>()</a>, <a href="../functions/fsetpos.html"><i>fsetpos</i>()</a>, <a href="../functions/fwrite.html"><i>fwrite</i>()</a>, <a href="../functions/getc.html"><i>getc</i>()</a>, <a href="../functions/getchar.html"><i>getchar</i>()</a>, <a href="../functions/lseek.html"><i>lseek</i>()</a>, <a href="../functions/putchar.html"><i>putchar</i>()</a>, <a href="../functions/putc.html"><i>putc</i>()</a>, <a href="../functions/read.html"><i>read</i>()</a>, and <a href="../functions/write.html"><i>write</i>()</a> functions provide for data transfer from the application to files (in all theirforms).</p><p>The <a href="../functions/closedir.html"><i>closedir</i>()</a>, <a href="../functions/link.html"><i>link</i>()</a>, <a href="../functions/mkdir.html"><i>mkdir</i>()</a>, <a href="../functions/opendir.html"><i>opendir</i>()</a>, <a href="../functions/readdir.html"><i>readdir</i>()</a>, <a href="../functions/rename.html"><i>rename</i>()</a>, <a href="../functions/rmdir.html"><i>rmdir</i>()</a>, <a href="../functions/rewinddir.html"><i>rewinddir</i>()</a>, and <a href="../functions/unlink.html"><i>unlink</i>()</a> functions provide for a complete set of operations on directories. Directories canarbitrarily contain other directories, and a single file can be mentioned in more than one directory.</p><p>The file-locking mechanism provides for advisory locking (protection during transactions) of ranges of bytes (in effect,records) in a file.</p><p>The <a href="../functions/confstr.html"><i>confstr</i>()</a>, <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a>, <ahref="../functions/pathconf.html"><i>pathconf</i>()</a>, and <a href="../functions/sysconf.html"><i>sysconf</i>()</a> functionsprovide for enquiry as to the behavior of the system where variability is permitted.</p><p>The Synchronized Input and Output option provides for assured commitment of data to media.</p><p>The Asynchronous Input and Output option provides for initiation and control of asynchronous data transfers.</p><h4><a name="tag_04_02_04"></a>Access to the Environment</h4><p>The operations and types in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a> are provided for access to asynchronous serialdevices. The primary intended use for these is the controlling terminal for the application (the interaction point between the userand the system). They are general enough to be used to control any asynchronous serial device. The functions are also generalenough to be used with many other device types as a user interface when some emulation is provided.</p><p>Less detailed access is provided for other device types, but in many instances an application need not know whether an object inthe file system is a device or a regular file to operate correctly.</p><h5><a name="tag_04_02_04_01"></a>Unsatisfied Requirements</h5><p>Detailed control of common device classes, specifically magnetic tape, is not provided.</p><h4><a name="tag_04_02_05"></a>Bounded (Realtime) Response</h4><p>The Realtime Signals Extension provides queued signals and the prioritization of the handling of signals. The SCHED_FIFO,SCHED_SPORADIC, and SCHED_RR scheduling policies provide control over processor allocation. The Semaphores option provideshigh-performance synchronization. The Memory Management functions provide memory locking for control of memory allocation, filemapping for high-performance, and shared memory for high-performance interprocess communication. The Message Passing optionprovides for interprocess communication without being dependent on shared memory.</p><p>The Timers option provides a high resolution function called <a href="../functions/nanosleep.html"><i>nanosleep</i>()</a> with afiner resolution than the <a href="../functions/sleep.html"><i>sleep</i>()</a> function.</p><p>The Typed Memory Objects option, the Monotonic Clock option, and the Timeouts option provide further facilities for applicationsto use to obtain predictable bounded response.</p><h4><a name="tag_04_02_06"></a>Operating System-Dependent Profile</h4><p>IEEE Std 1003.1-2001 makes no distinction between text and binary files. The values of EXIT_SUCCESS and EXIT_FAILUREare further defined.</p><h5><a name="tag_04_02_06_01"></a>Unsatisfied Requirements</h5><p>None known, but the ISO C standard may contain some additional options that could be specified.</p><h4><a name="tag_04_02_07"></a>I/O Interaction</h4><p>IEEE Std 1003.1-2001 defines how each of the ISO C standard <i>stdio</i> functions interact with the POSIX.1operations, typically specifying the behavior in terms of POSIX.1 operations.</p><h5><a name="tag_04_02_07_01"></a>Unsatisfied Requirements</h5><p>None.</p><h4><a name="tag_04_02_08"></a>Internationalization Interaction</h4><p>The IEEE Std 1003.1-2001 environment operations provide a means to define the environment for <a href="../functions/setlocale.html"><i>setlocale</i>()</a> and time functions such as <a href="../functions/ctime.html"><i>ctime</i>()</a>. The <a href="../functions/tzset.html"><i>tzset</i>()</a> function is provided to settime conversion information.</p><p>The <a href="../functions/nl_langinfo.html"><i>nl_langinfo</i>()</a> function is provided as an XSI extension to querylocale-specific cultural settings.</p><h5><a name="tag_04_02_08_01"></a>Unsatisfied Requirements</h5><p>None.</p><h4><a name="tag_04_02_09"></a>C-Language Extensions</h4><p>The <a href="../functions/setjmp.html"><i>setjmp</i>()</a> and <a href="../functions/longjmp.html"><i>longjmp</i>()</a>functions are not defined to be cognizant of the signal masks defined for POSIX.1. The <a href="../functions/sigsetjmp.html"><i>sigsetjmp</i>()</a> and <a href="../functions/siglongjmp.html"><i>siglongjmp</i>()</a> functionsare provided to fill this gap.</p><p>The <a href="../functions/_setjmp.html"><i>_setjmp</i>()</a> and <a href="../functions/_longjmp.html"><i>_longjmp</i>()</a>functions are provided as XSI extensions to support historic practice.</p><h5><a name="tag_04_02_09_01"></a>Unsatisfied Requirements</h5><p>None.</p><h4><a name="tag_04_02_10"></a>Command Language</h4><p>The shell command language, as described in the Shell and Utilities volume of IEEE Std 1003.1-2001, <a href="../utilities/xcu_chap02.html">Chapter 2, Shell Command Language</a>, is a common language useful in batch scripts, through an APIto high-level languages (for the C-Language Binding option, <a href="../functions/system.html"><i>system</i>()</a> and <a href="../functions/popen.html"><i>popen</i>()</a>) and through an interactive terminal (see the <a href="../utilities/sh.html"><i>sh</i></a> utility). The shell language has many of the characteristics of a high-level language, but ithas been designed to be more suitable for user terminal entry and includes interactive debugging facilities. Through the use ofpipelining, many complex commands can be constructed from combinations of data filters and other common components. Shell scriptscan be created, stored, recalled, and modified by the user with simple editors.</p><p>In addition to the basic shell language, the following utilities offer features that simplify and enhance programmatic access tothe utilities and provide features normally found only in high-level languages: <a href="../utilities/basename.html"><i>basename</i></a>, <a href="../utilities/bc.html"><i>bc</i></a>, <a href="../utilities/command.html"><i>command</i></a>, <a href="../utilities/dirname.html"><i>dirname</i></a>, <a href="../utilities/echo.html"><i>echo</i></a>, <a href="../utilities/env.html"><i>env</i></a>, <a href="../utilities/expr.html"><i>expr</i></a>, <a href="../utilities/false.html"><i>false</i></a>, <a href="../utilities/printf.html"><i>printf</i></a>, <a href="../utilities/read.html"><i>read</i></a>, <a href="../utilities/sleep.html"><i>sleep</i></a>, <a href="../utilities/tee.html"><i>tee</i></a>, <a href="../utilities/test.html"><i>test</i></a>, CONVERSION ERROR (.Cm) time *,<a href="#tag_foot_1"><sup><small>1</small></sup></a> <ahref="../utilities/true.html"><i>true</i></a>, <a href="../utilities/wait.html"><i>wait</i></a>, <a href="../utilities/xargs.html"><i>xargs</i></a>, and all of the special built-in utilities in the Shell and Utilities volume ofIEEE Std 1003.1-2001, <a href="../utilities/xcu_chap02.html#tag_02_14">Section 2.14, Special Built-In Utilities</a>.</p><h5><a name="tag_04_02_10_01"></a>Unsatisfied Requirements</h5><p>None.</p><h4><a name="tag_04_02_11"></a>Interactive Facilities</h4><p>The utilities offer a common style of command-line interface through conformance to the Utility Syntax Guidelines (see the BaseDefinitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility SyntaxGuidelines</a>) and the common utility defaults (see the Shell and Utilities volume of IEEE Std 1003.1-2001, <a href="../utilities/xcu_chap01.html#tag_01_11">Section 1.11, Utility Description Defaults</a>). The <a href="../utilities/sh.html"><i>sh</i></a> utility offers an interactive command-line history and editing facility. The followingutilities in the User Portability Utilities option have been customized for interactive use: <a href="../utilities/alias.html"><i>alias</i></a>, <a href="../utilities/ex.html"><i>ex</i></a>, <a href="../utilities/fc.html"><i>fc</i></a>, <a href="../utilities/mailx.html"><i>mailx</i></a>, <a href="../utilities/more.html"><i>more</i></a>, <a href="../utilities/talk.html"><i>talk</i></a>, <a href="../utilities/vi.html"><i>vi</i></a>, <a href="../utilities/unalias.html"><i>unalias</i></a>, and <a href="../utilities/write.html"><i>write</i></a>; the <a href="../utilities/man.html"><i>man</i></a> utility offers online access tosystem documentation.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -