📄 sigsuspend.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>sigsuspend</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_008_741"> </a>NAME</h4><blockquote>sigsuspend - wait for a signal</blockquote><h4><a name = "tag_000_008_742"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="signal.h.html">signal.h</a>>int sigsuspend(const sigset_t *<i>sigmask</i>);</code></pre></blockquote><h4><a name = "tag_000_008_743"> </a>DESCRIPTION</h4><blockquote>The<i>sigsuspend()</i>function replaces the current signal mask of the calling threadwith the setof signals pointedto by <i>sigmask</i> and then suspends the thread untildelivery of a signal whose action is either to execute a signal-catchingfunction or to terminate the process.This will not cause any other signals that may have been pending onthe process to become pending on the thread.<p>If the action is to terminate the process then<i>sigsuspend()</i>will never return. If the action is to execute a signal-catching function,then<i>sigsuspend()</i>will return after the signal-catching functionreturns, with the signal mask restoredto the set that existed prior to the<i>sigsuspend()</i>call.<p>It is not possible to block signals that cannot be ignored.This is enforced by the system without causing an error to be indicated.</blockquote><h4><a name = "tag_000_008_744"> </a>RETURN VALUE</h4><blockquote>Since<i>sigsuspend()</i>suspends process execution indefinitely, there isno successful completion return value.If a return occurs, -1 is returned and<i>errno</i>is set to indicate the error.</blockquote><h4><a name = "tag_000_008_745"> </a>ERRORS</h4><blockquote>The<i>sigsuspend()</i>function will fail if:<dl compact><dt>[EINTR]<dd>A signal is caught by the calling process and control is returnedfrom the signal-catching function.</dl></blockquote><h4><a name = "tag_000_008_746"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_747"> </a>APPLICATION USAGE</h4><blockquote>An interpretation request has been filed with IEEE PASC concerningwhether<i>sigsuspend()</i>suspends process execution or suspends thread execution.The wording here matches the description of this interface specifiedby the ISO POSIX-1 standard.</blockquote><h4><a name = "tag_000_008_748"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_749"> </a>SEE ALSO</h4><blockquote><i><a href="pause.html">pause()</a></i>,<i><a href="sigaction.html">sigaction()</a></i>,<i><a href="sigaddset.html">sigaddset()</a></i>,<i><a href="sigdelset.html">sigdelset()</a></i>,<i><a href="sigemptyset.html">sigemptyset()</a></i>,<i><a href="sigfillset.html">sigfillset()</a></i>,<i><a href="signal.h.html"><signal.h></a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from the POSIX.1-1988 standard.</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 + -