mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
105 lines
2.3 KiB
XML
105 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.pcntl-signal-dispatch" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pcntl_signal_dispatch</refname>
|
|
<refpurpose>Calls signal handlers for pending signals</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>pcntl_signal_dispatch</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
The <function>pcntl_signal_dispatch</function> function calls the signal
|
|
handlers installed by <function>pcntl_signal</function> for each pending
|
|
signal.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>pcntl_signal_dispatch</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo "Installing signal handler...\n";
|
|
pcntl_signal(SIGHUP, function($signo) {
|
|
echo "signal handler called\n";
|
|
});
|
|
|
|
echo "Generating signal SIGHUP to self...\n";
|
|
posix_kill(posix_getpid(), SIGHUP);
|
|
|
|
echo "Dispatching...\n";
|
|
pcntl_signal_dispatch();
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Installing signal handler...
|
|
Generating signal SIGHUP to self...
|
|
Dispatching...
|
|
signal handler called
|
|
Done
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pcntl_signal</function></member>
|
|
<member><function>pcntl_sigprocmask</function></member>
|
|
<member><function>pcntl_sigwaitinfo</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
|
|
-->
|