mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
112 lines
3.8 KiB
HTML
112 lines
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>带超时机制的信号等待</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.pcntl-sigtimedwait" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">pcntl_sigtimedwait</h1>
|
|
<p class="verinfo">(PHP 5 >= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">pcntl_sigtimedwait</span> — <span class="dc-title">带超时机制的信号等待</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.pcntl-sigtimedwait-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>pcntl_sigtimedwait</strong></span>
|
|
( <span class="methodparam"><span class="type">array</span> <code class="parameter">$set</code></span>
|
|
[, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$siginfo</code></span>
|
|
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$seconds</code><span class="initializer"> = 0</span></span>
|
|
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$nanoseconds</code><span class="initializer"> = 0</span></span>
|
|
]]] ) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
函数<span class="function"><strong>pcntl_sigtimedwait()</strong></span>实际上与<span class="function"><a href="pcntl_sigwaitinfo.html" class="function">pcntl_sigwaitinfo()</a></span>
|
|
的行为一致,不同在于它多了两个增强参数<code class="parameter">seconds</code>和
|
|
<code class="parameter">nanoseconds</code>,这使得脚本等待的事件有了一个时间的上限。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.pcntl-sigtimedwait-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">set</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
要等待的信号列表数组。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">siginfo</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
<code class="parameter">siginfo</code>是一个输出参数,用来返回信号的信息。更详细情况参见
|
|
<span class="function"><a href="pcntl_sigwaitinfo.html" class="function">pcntl_sigwaitinfo()</a></span>。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">seconds</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
超时秒数。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">nanoseconds</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
超时纳秒数。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.pcntl-sigtimedwait-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
成功时,函数<span class="function"><strong>pcntl_sigtimedwait()</strong></span>返回信号编号。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.pcntl-sigtimedwait-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="pcntl_sigprocmask.html" class="function" rel="rdfs-seeAlso">pcntl_sigprocmask()</a> - 设置或检索阻塞信号</span></li>
|
|
<li class="member"><span class="function"><a href="pcntl_sigwaitinfo.html" class="function" rel="rdfs-seeAlso">pcntl_sigwaitinfo()</a> - 等待信号</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |