mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-29 07:18:55 +00:00

Detected by codespell Patch provided by tandre@php.net. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349708 c90b9560-bf6c-de11-be94-00142212c4b1
146 lines
4.1 KiB
XML
146 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.pcntl-sigwaitinfo" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pcntl_sigwaitinfo</refname>
|
|
<refpurpose>Waits for signals</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>pcntl_sigwaitinfo</methodname>
|
|
<methodparam><type>array</type><parameter>set</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter role="reference">siginfo</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
The <function>pcntl_sigwaitinfo</function> function suspends execution of the
|
|
calling script until one of the signals given in <parameter>set</parameter>
|
|
are delivered. If one of the signal is already pending (e.g. blocked by
|
|
<function>pcntl_sigprocmask</function>),
|
|
<function>pcntl_sigwaitinfo</function> will return immediately.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>set</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Array of signals to wait for.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>siginfo</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The <parameter>siginfo</parameter> parameter is set to an array containing
|
|
information about the signal.
|
|
</para>
|
|
<para>
|
|
The following elements are set for all signals:
|
|
<simplelist>
|
|
<member>signo: Signal number</member>
|
|
<member>errno: An error number</member>
|
|
<member>code: Signal code</member>
|
|
</simplelist>
|
|
</para>
|
|
<para>
|
|
The following elements may be set for the <constant>SIGCHLD</constant> signal:
|
|
<simplelist>
|
|
<member>status: Exit value or signal</member>
|
|
<member>utime: User time consumed</member>
|
|
<member>stime: System time consumed</member>
|
|
<member>pid: Sending process ID</member>
|
|
<member>uid: Real user ID of sending process</member>
|
|
</simplelist>
|
|
</para>
|
|
<para>
|
|
The following elements may be set for the <constant>SIGILL</constant>,
|
|
<constant>SIGFPE</constant>, <constant>SIGSEGV</constant> and
|
|
<constant>SIGBUS</constant> signals:
|
|
<simplelist>
|
|
<member>addr: Memory location which caused fault</member>
|
|
</simplelist>
|
|
</para>
|
|
<para>
|
|
The following element may be set for the <constant>SIGPOLL</constant>
|
|
signal:
|
|
<simplelist>
|
|
<member>band: Band event</member>
|
|
<member>fd: File descriptor number</member>
|
|
</simplelist>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
On success, <function>pcntl_sigwaitinfo</function> returns a signal number.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>pcntl_sigwaitinfo</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo "Blocking SIGHUP signal\n";
|
|
pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP));
|
|
|
|
echo "Sending SIGHUP to self\n";
|
|
posix_kill(posix_getpid(), SIGHUP);
|
|
|
|
echo "Waiting for signals\n";
|
|
$info = array();
|
|
pcntl_sigwaitinfo(array(SIGHUP), $info);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pcntl_sigprocmask</function></member>
|
|
<member><function>pcntl_sigtimedwait</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|