⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sigqueue.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>sigqueue</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_008_702">&nbsp;</a>NAME</h4><blockquote>sigqueue - queue a signal to a process(<b>REALTIME</b>)</blockquote><h4><a name = "tag_000_008_703">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="systypes.h.html">sys/types.h</a>&gt;#include &lt;<a href="signal.h.html">signal.h</a>&gt;int sigqueue(pid_t <i>pid</i>, int <i>signo</i>, const union sigval <i>value</i>);</code></pre></blockquote><h4><a name = "tag_000_008_704">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>sigqueue()</i>function causes the signal specified by<i>signo</i>to be sent with the value specified by<i>value</i>to the process specified by<i>pid.</i>If<i>signo</i>is zero (the null signal), error checking is performedbut no signal is actually sent.The null signal can be used to check the validity of<i>pid</i>.<p>The conditions required for a process to have permission to queue a signalto another process are the same as for the<i><a href="kill.html">kill()</a></i>function.<p>The<i>sigqueue()</i>function returns immediately.If SA_SIGINFO is set for<i>signo</i>and if the resources were available to queue the signal,the signal is queued and sent to the receiving process.If SA_SIGINFO is not set for<i>signo</i>,then<i>signo</i>is sent at least once to the receiving process;it is unspecified whether<i>value</i>will be sent to the receiving process as a result of this call.<p>If the value of<i>pid</i>causes<i>signo</i>to be generated for the sending process,and if<i>signo</i>is not blocked for the calling thread and if no other thread has<i>signo</i>unblocked or is waiting in a<i><a href="sigwait.html">sigwait()</a></i>function for<i>signo</i>,either<i>signo</i>or at least the pending, unblocked signalwill be delivered to the calling thread before the<i>sigqueue()</i>function returns.Should any of multiple pending signals in the range SIGRTMIN toSIGRTMAX be selected for delivery, it will be the lowest numbered one.The selection order between realtime and non-realtime signals, orbetween multiple pending non-realtime signals, is unspecified.</blockquote><h4><a name = "tag_000_008_705">&nbsp;</a>RETURN VALUE</h4><blockquote>Upon successful completion,the specified signal will have been queued, and the<i>sigqueue()</i>function returns a value of zero.Otherwise, the function returns a value of -1 and sets<i>errno</i>to indicate the error.</blockquote><h4><a name = "tag_000_008_706">&nbsp;</a>ERRORS</h4><blockquote>The <i>sigqueue()</i>function will fail if:<dl compact><dt>[EAGAIN]<dd>No resources available to queue the signal.The process has already queued SIGQUEUE_MAXsignals that are still pending at the receiver(s),or a system-wide resource limit has been exceeded.<dt>[EINVAL]<dd>The value of the<i>signo</i>argument is an invalid or unsupported signal number.<dt>[ENOSYS]<dd>The function<i>sigqueue()</i>is not supported by this implementation.<dt>[EPERM]<dd>The process does not have the appropriate privilegeto send the signal to the receiving process.<dt>[ESRCH]<dd>The process<i>pid</i>does not exist.</dl></blockquote><h4><a name = "tag_000_008_707">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_708">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_709">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_008_710">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="signal.h.html">&lt;signal.h&gt;</a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995) and the POSIX Threads Extension (1003.1c-1995)</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + -