📄 siglongjmp.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>siglongjmp</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_654"> </a>NAME</h4><blockquote>siglongjmp - non-local goto with signal handling</blockquote><h4><a name = "tag_000_008_655"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="setjmp.h.html">setjmp.h</a>>void siglongjmp(sigjmp_buf <i>env</i>, int <i>val</i>);</code></pre></blockquote><h4><a name = "tag_000_008_656"> </a>DESCRIPTION</h4><blockquote>The<i>siglongjmp()</i>function restores the environment saved by the most recent invocation of<i><a href="sigsetjmp.html">sigsetjmp()</a></i>in the same thread, with the corresponding<i>sigjmp_buf</i>argument. If there is no such invocation, or if the function containing theinvocation of<i><a href="sigsetjmp.html">sigsetjmp()</a></i>has terminated execution in the interim, the behaviour is undefined.<p>All accessible objects have values as of the time<i><a href="sigsetjmp.html">sigsetjmp()</a></i>was called, except that the values of objects of automaticstorage duration which are local to the function containing theinvocation of the corresponding<i><a href="sigsetjmp.html">sigsetjmp()</a></i>which do not have volatile-qualified type and which arechanged between the<i><a href="sigsetjmp.html">sigsetjmp()</a></i>invocation and<i>siglongjmp()</i>call are indeterminate.<p>As it bypasses the usual function call and return mechanisms,<i>siglongjmp()</i>will execute correctly in contexts of interrupts,signals and any of their associated functions.However, if<i>siglongjmp()</i>is invoked from a nested signal handler (that is, from afunction invoked as a result of a signal raised during thehandling of another signal), the behaviour is undefined.<p>The<i>siglongjmp()</i>function will restore the saved signal mask if and only if the<i>env</i>argument was initialised by a call to<i><a href="sigsetjmp.html">sigsetjmp()</a></i>with a non-zero<i>savemask</i>argument.<p>The effect of a call to<i>siglongjmp()</i>where initialisation of the<b>jmp_buf</b>structure was not performed in the calling thread is undefined.</blockquote><h4><a name = "tag_000_008_657"> </a>RETURN VALUE</h4><blockquote>After<i>siglongjmp()</i>is completed, program execution continues as if the correspondinginvocation of<i><a href="sigsetjmp.html">sigsetjmp()</a></i>had just returned the value specified by<i>val</i>.The<i>siglongjmp()</i>function cannot cause<i><a href="sigsetjmp.html">sigsetjmp()</a></i>to return 0; if<i>val</i>is 0,<i><a href="sigsetjmp.html">sigsetjmp()</a></i>returns the value 1.</blockquote><h4><a name = "tag_000_008_658"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_008_659"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_660"> </a>APPLICATION USAGE</h4><blockquote>The distinction between<i><a href="setjmp.html">setjmp()</a></i>or<i><a href="longjmp.html">longjmp()</a></i>and<i><a href="sigsetjmp.html">sigsetjmp()</a></i>or<i>siglongjmp()</i>is only significant for programs which use<i><a href="sigaction.html">sigaction()</a></i>,<i><a href="sigprocmask.html">sigprocmask()</a></i>or<i><a href="sigsuspend.html">sigsuspend()</a></i>.</blockquote><h4><a name = "tag_000_008_661"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_662"> </a>SEE ALSO</h4><blockquote><i><a href="longjmp.html">longjmp()</a></i>,<i><a href="setjmp.html">setjmp()</a></i>,<i><a href="sigprocmask.html">sigprocmask()</a></i>,<i><a href="sigsetjmp.html">sigsetjmp()</a></i>,<i><a href="sigsuspend.html">sigsuspend()</a></i>,<i><a href="setjmp.h.html"><setjmp.h></a></i>.<br></blockquote><h4>DERIVATION</h4><blockquote>Derived from the ISO POSIX-1 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 + -