-
Notifications
You must be signed in to change notification settings - Fork 837
Missing function documentation for pcntl_wifcontinued and pcntl_forkx #4918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AllenJB
wants to merge
3
commits into
php:master
Choose a base branch
from
AllenJB:pcntl_undoc_funcs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- $Revision$ --> | ||
| <refentry xml:id="function.pcntl-forkx" xmlns="http://docbook.org/ns/docbook"> | ||
| <refnamediv> | ||
| <refname>pcntl_forkx</refname> | ||
| <refpurpose>Forks the currently running process, with additional options (Solaris only)</refpurpose> | ||
| </refnamediv> | ||
|
|
||
| <refsect1 role="description"> | ||
| &reftitle.description; | ||
| <methodsynopsis> | ||
| <type>int</type><methodname>pcntl_forkx</methodname> | ||
| <methodparam><type>int</type><parameter>flags</parameter></methodparam> | ||
| </methodsynopsis> | ||
| <para> | ||
| The <function>pcntl_forkx</function> function creates a child | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note that forkx, |
||
| process that differs from the parent process only in its PID and | ||
| PPID. Please see your system's forkx(2) man page for specific details as to | ||
| how forkx works on your system. | ||
| </para> | ||
| <para> | ||
| This function is only available on <productname>Solaris</productname>. | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="parameters"> | ||
| &reftitle.parameters; | ||
| <para> | ||
| <variablelist> | ||
| <varlistentry> | ||
| <term><parameter>flags</parameter></term> | ||
| <listitem> | ||
| <para> | ||
| The <parameter>flags</parameter> parameter must be one of the following values: | ||
| <table> | ||
| <title>Possible values for <parameter>flags</parameter></title> | ||
| <tgroup cols="2"> | ||
| <tbody> | ||
| <row> | ||
| <entry><constant>FORK_WAITPID</constant></entry> | ||
| <entry> | ||
| The parent process must call <function>pcntl_waitpid</function> or | ||
| <function>pcntl_waitid</function> with the childs processid. Calls | ||
| that wait on multiple process IDs do not qualify. Otherwise, the | ||
| child will remain as a zombie process until the parent exits. | ||
| </entry> | ||
| </row> | ||
| <row> | ||
| <entry><constant>FORK_NOSIGCHLD</constant></entry> | ||
| <entry> | ||
| Do not post a <constant>SIGCHLD</constant> signal to the parent | ||
| process when the child terminates. | ||
| </entry> | ||
| </row> | ||
| </tbody> | ||
| </tgroup> | ||
| </table> | ||
| </para> | ||
| </listitem> | ||
| </varlistentry> | ||
| </variablelist> | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="returnvalues"> | ||
| &reftitle.returnvalues; | ||
| <para> | ||
| On success, the PID of the child process is returned in the | ||
| parent's thread of execution, and a 0 is returned in the child's | ||
| thread of execution. On failure, a -1 will be returned in the | ||
| parent's context, no child process will be created, and a PHP | ||
| error is raised. | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="examples"> | ||
| &reftitle.examples; | ||
| <para> | ||
| <example> | ||
| <title><function>pcntl_forkx</function> example</title> | ||
| <programlisting role="php"> | ||
| <![CDATA[ | ||
| <?php | ||
|
|
||
| $pid = pcntl_forkx(FORK_WAITPID); | ||
| if ($pid == -1) { | ||
| die('Could not fork'); | ||
| } else if ($pid) { | ||
| // we are the parent | ||
| // Protect against Zombie children | ||
| pcntl_waitpid($pid, $status); | ||
| } else { | ||
| // we are the child | ||
| } | ||
|
|
||
| ?> | ||
| ]]> | ||
| </programlisting> | ||
| </example> | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="seealso"> | ||
| &reftitle.seealso; | ||
| <para> | ||
| <simplelist> | ||
| <member><function>pcntl_fork</function></member> | ||
| <member><function>pcntl_waitid</function></member> | ||
| <member><function>pcntl_waitpid</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 | ||
| --> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- $Revision$ --> | ||
| <refentry xml:id="function.pcntl-wifcontinued" xmlns="http://docbook.org/ns/docbook"> | ||
| <refnamediv> | ||
| <refname>pcntl_wifcontinued</refname> | ||
| <refpurpose>Checks if status code represents a process that was resumed with SIGCONT</refpurpose> | ||
| </refnamediv> | ||
|
|
||
| <refsect1 role="description"> | ||
| &reftitle.description; | ||
| <methodsynopsis> | ||
| <type>bool</type><methodname>pcntl_wifcontinued</methodname> | ||
| <methodparam><type>int</type><parameter>status</parameter></methodparam> | ||
| </methodsynopsis> | ||
| <para> | ||
| Checks whether the child status code represents a process that was resumed | ||
| due to a <constant>SIGCONT</constant> signal. | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="parameters"> | ||
| &reftitle.parameters; | ||
| <para> | ||
| <variablelist> | ||
| <varlistentry> | ||
| <term><parameter>status</parameter></term> | ||
| <listitem> | ||
| &pcntl.parameter.status; | ||
| </listitem> | ||
| </varlistentry> | ||
| </variablelist> | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="returnvalues"> | ||
| &reftitle.returnvalues; | ||
| <para> | ||
| Returns &true; if the child status code represents a process that was resumed | ||
| due to a <constant>SIGCONT</constant> signal, &false; | ||
| otherwise. | ||
| </para> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="seealso"> | ||
| &reftitle.seealso; | ||
| <para> | ||
| <simplelist> | ||
| <member><function>pcntl_wait</function></member> | ||
| <member><function>pcntl_waitid</function></member> | ||
| <member><function>pcntl_waitpid</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 | ||
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
Solaris only, illumos systems support it too