svn: /phpdoc/en/trunk/reference/pcntl/functions/ pcntl-signal.xml
| From: | Adam Harvey | Date: | Wed, 12 Jun 2013 19:30:38 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/pcntl/functions/ pcntl-signal.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-11378@lists.php.net to get a copy of this message | ||
aharvey Wed, 12 Jun 2013 19:30:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=330486
Log:
Update the types pcntl_signal() can handle as the handler, and expand the
documentation for what the handler callback should actually look like.
Fixes doc bug #65008 (pcntl_signal()'s wrong method signature).
Bug: https://bugs.php.net/65008 (Open)
pcntl_signal()'s wrong method signature
Changed paths:
U phpdoc/en/trunk/reference/pcntl/functions/pcntl-signal.xml
Modified: phpdoc/en/trunk/reference/pcntl/functions/pcntl-signal.xml
===================================================================
--- phpdoc/en/trunk/reference/pcntl/functions/pcntl-signal.xml 2013-06-12 19:27:21 UTC (rev 330485)
+++ phpdoc/en/trunk/reference/pcntl/functions/pcntl-signal.xml 2013-06-12 19:30:38 UTC (rev 330486)
@@ -11,7 +11,7 @@
<methodsynopsis>
<type>bool</type><methodname>pcntl_signal</methodname>
<methodparam><type>int</type><parameter>signo</parameter></methodparam>
-
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
+
<methodparam><type>callable|int</type><parameter>handler</parameter></methodparam>
<methodparam
choice="opt"><type>bool</type><parameter>restart_syscalls</parameter><initializer>true</initializer></methodparam>
</methodsynopsis>
<para>
@@ -36,10 +36,32 @@
<term><parameter>handler</parameter></term>
<listitem>
<para>
- The signal handler which may be the name of a user created function,
- or method, or either of the two global constants
- <constant>SIG_IGN</constant> or <constant>SIG_DFL</constant>.
+ The signal handler. This may be either a <type>callable</type>, which
+ will be invoked to handle the signal, or either of the two global
+ constants <constant>SIG_IGN</constant> or
<constant>SIG_DFL</constant>,
+ which will ignore the signal or restore the default signal handler
+ respectively.
</para>
+ <para>
+ If a <type>callable</type> is given, it must implement the following
+ signature:
+ </para>
+ <para>
+ <methodsynopsis>
+
<type>void</type><methodname><replaceable>handler</replaceable></methodname>
+
<methodparam><type>int</type><parameter>signo</parameter></methodparam>
+ </methodsynopsis>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>signo</parameter></term>
+ <listitem>
+ <simpara>
+ The signal being handled.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
<note>
<para>
Note that when you set a handler to an object method, that object's