📄 siglib.html
字号:
int signo /* signal to add */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds the signal specified by <i>signo</i> to the signal set specified by <i>pSet</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal number is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigdelset"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigdelset</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigdelset</i>( )</strong> - delete a signal from a signal set (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigdelset ( sigset_t * pSet, /* signal set to delete signal from */ int signo /* signal to delete */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes the signal specified by <i>signo</i> from the signal setspecified by <i>pSet</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal number is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigismember"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigismember</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigismember</i>( )</strong> - test to see if a signal is in a signal set (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigismember ( const sigset_t * pSet, /* signal set to test */ int signo /* signal to test for */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine tests whether the signal specified by <i>signo</i> isa member of the set specified by <i>pSet</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>1 if the specified signal is a member of the specified set, OK(0) if it is not, or ERROR (-1) if the test fails.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="signal"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>signal</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>signal</i>( )</strong> - specify the handler associated with a signal</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void (*signal ( int signo, void (*pHandler) () )) () </pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine chooses one of three ways in which receipt of the signalnumber <i>signo</i> is to be subsequently handled. If the value of <i>pHandler</i> is<b>SIG_DFL</b>, default handling for that signal will occur. If the value of<i>pHandler</i> is <b>SIG_IGN</b>, the signal will be ignored. Otherwise, <i>pHandler</i>must point to a function to be called when that signal occurs.<p></blockquote><h4>RETURNS</h4><blockquote><p>The value of the previous signal handler, or <b>SIG_ERR</b>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigaction"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigaction</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigaction</i>( )</strong> - examine and/or specify the action associated with a signal (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigaction ( int signo, /* signal of handler of interest */ const struct sigaction * pAct, /* location of new handler */ struct sigaction * pOact /* location to store old handler */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allows the calling process to examine and/or specifythe action to be associated with a specific signal.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal number is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigprocmask"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigprocmask</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigprocmask</i>( )</strong> - examine and/or change the signal mask (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigprocmask ( int how, /* how signal mask will be changed */ const sigset_t * pSet, /* location of new signal mask */ sigset_t * pOset /* location to store old signal mask */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allows the calling process to examine and/or change itssignal mask. If the value of <i>pSet</i> is not NULL, it points to a set ofsignals to be used to change the currently blocked set.<p>The value of <i>how</i> indicates the manner in which the set is changed andconsists of one of the following, defined in <b>signal.h</b>:<dl><dt><b>SIG_BLOCK</b><dd>the resulting set is the union of the current set and the signal setpointed to by <i>pSet</i>.<p><dt><b>SIG_UNBLOCK</b><dd>the resulting set is the intersection of the current set and the complementof the signal set pointed to by <i>pSet</i>.<p><dt><b>SIG_SETMASK</b><dd> the resulting set is the signal set pointed to by <i>pSset</i>.<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK (0), or ERROR (-1) if <i>how</i> is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b>, <b><i><a href="./sigLib.html#sigsetmask">sigsetmask</a></i>( )</b>, <b><i><a href="./sigLib.html#sigblock">sigblock</a></i>( )</b><hr><a name="sigpending"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigpending</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigpending</i>( )</strong> - retrieve the set of pending signals blocked from delivery (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigpending ( sigset_t * pSet /* location to store pending signal set */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine stores the set of signals that are blocked from delivery andthat are pending for the calling process in the space pointed to by<i>pSet</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal TCB cannotbe allocated.<p></blockquote><h4>ERRNO</h4><blockquote><p>ENOMEM</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigsuspend"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigsuspend</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigsuspend</i>( )</strong> - suspend the task until delivery of a signal (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigsuspend ( const sigset_t * pSet /* signal mask while suspended */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine suspends the task until delivery of a signal. Whilesuspended, <i>pSet</i> is used as the set of masked signals.<p></blockquote><h4>NOTE</h4><blockquote><p>Since the <b><i><a href="./sigLib.html#sigsuspend">sigsuspend</a></i>( )</b> function suspends thread executionindefinitely, there is no successful completion return value.<p></blockquote><h4>RETURNS</h4><blockquote><p>-1, always.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINTR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="pause"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>pause</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>pause</i>( )</strong> - suspend the task until delivery of a signal (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int pause (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine suspends the task until delivery of a signal.<p></blockquote><h4>NOTE</h4><blockquote><p>Since the <b><i><a href="./sigLib.html#pause">pause</a></i>( )</b> function suspends thread execution indefinitely,there is no successful completion return value.<p></blockquote><h4>RETURNS</h4><blockquote><p>-1, always.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINTR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigtimedwait"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sigtimedwait</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sigtimedwait</i>( )</strong> - wait for a signal</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigtimedwait ( const sigset_t * pSet, /* the signal mask while suspended */ struct siginfo * pInfo, /* return value */ const struct timespec * pTimeout )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The function <b><i><a href="./sigLib.html#sigtimedwait">sigtimedwait</a></i>( )</b> selects the pending signal from the setspecified by <i>pSet</i>. If multiple signals in <i>pSet</i> are pending, it willremove and return the lowest numbered one. If no signal in <i>pSet</i> is pendingat thetime of the call, the task will be suspend until one of the signals in <i>pSet</i>become pending, it is interrupted by an unblocked caught signal, oruntil the time interval specified by <i>pTimeout</i> has expired.If <i>pTimeout</i> is NULL, then the timeout interval is forever.<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -