📄 syswait.h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title><sys/wait.h></title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_009_405"> </a>NAME</h4><blockquote>sys/wait.h - declarations for waiting</blockquote><h4><a name = "tag_000_009_406"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <sys/wait.h></code></pre></blockquote><h4><a name = "tag_000_009_407"> </a>DESCRIPTION</h4><blockquote>The<i><sys/wait.h></i>header defines the following symbolic constants for use with<i><a href="waitpid.html">waitpid()</a></i>:<dl compact><dt>WNOHANG<dd>Do not hang if no status is available, return immediately.<dt>WUNTRACED<dd>Report status of stopped child process.</dl><p>and the following macros for analysis of process status values:<dl compact><dt>WEXITSTATUS()<dd><index term="WEXITSTATUS()"></index>Return exit status.<dt>WIFCONTINUED()<dd><index term="WIFCONTINUED()"></index>True if child has been continued<dt>WIFEXITED()<dd><index term="WIFEXITED()"></index>True if child exited normally.<dt>WIFSIGNALED()<dd><index term="WIFSIGNALED()"></index>True if child exited due to uncaught signal.<dt>WIFSTOPPED()<dd><index term="WIFSTOPPED()"></index>True if child is currently stopped.<dt>WSTOPSIG()<dd><index term="WSTOPSIG()"></index>Return signal number that caused process to stop.<dt>WTERMSIG()<dd><index term="WTERMSIG()"></index>Return signal number that caused process to terminate.</dl><p>The following symbolic constants are defined as possible valuesfor the <i>options</i> argument to<i><a href="waitid.html">waitid()</a></i>:<dl compact><dt>WEXITED<dd>Wait for processes that have exited.<dt>WSTOPPED<dd>Status will be returned for any child that has stopped upon receipt of asignal.<dt>WCONTINUED<dd>Status will be returned for any child that was stopped and has been continued.<dt>WNOHANG<dd>Return immediately if there are no children to wait for.<dt>WNOWAIT<dd>Keep the process whose status is returned in <i>infop</i> in a waitable state.</dl><p>The type <b>idtype_t</b> is defined as an enumeration type whosepossible values include at least the following:<pre>P_ALLP_PIDP_PGID</pre><p>The <b>id_t</b> type is defined as described in<i><a href="systypes.h.html"><sys/types.h></a></i>.<p>The <b>siginfo_t</b> type is defined as described in<i><a href="signal.h.html"><signal.h></a></i>.<p>The <b>rusage</b> structure is defined as described in<i><a href="sysresource.h.html"><sys/resource.h></a></i>.<p>The <b>pid_t</b> type is defined as described in<i><a href="systypes.h.html"><sys/types.h></a></i>.<p>Inclusion of the<i><sys/wait.h></i>header may also make visible all symbols from<i><a href="signal.h.html"><signal.h></a></i>and<i><a href="sysresource.h.html"><sys/resource.h></a></i>.<p>The following are declared as functions and may also be definedas macros.Function prototypes must be provided for use with an ISO Ccompiler.<pre><code>pid_t <a href="wait.html">wait</a>(int *);pid_t <a href="wait3.html">wait3</a>(int *, int, struct rusage *);int <a href="waitid.html">waitid</a>(idtype_t, id_t, siginfo_t *, int);pid_t <a href="waitpid.html">waitpid</a>(pid_t, int *, int);</code></pre></blockquote><h4><a name = "tag_000_009_408"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_009_409"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_009_410"> </a>SEE ALSO</h4><blockquote><i><a href="wait.html">wait()</a></i>,<i><a href="waitid.html">waitid()</a></i>.<i><a href="sysresource.h.html"><sys/resource.h></a></i>,<i><a href="systypes.h.html"><sys/types.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -