note 88389 added to function.pcntl-fork
| From: | potsedatgmaildotcom at osu1 dot php dot net | Date: | Thu, 22 Jan 2009 02:27:05 +0000 |
| Subject: | note 88389 added to function.pcntl-fork | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149638@lists.php.net to get a copy of this message | ||
Hi, just wanted to put a cleaner written of the example code in the docs.
<?php
$pid = pcntl_fork();
if ( -1 == $pid )
{
die( 'could not fork' );
}
if ( !$pid )
{
// I am a child
}
// I am still the parent
pcntl_wait($status); //Protect against Zombie children
?>
----
Server IP: 117.104.160.194
Probable Submitter: 203.206.159.200
----
Manual Page -- http://www.php.net/manual/en/function.pcntl-fork.php
Edit -- https://master.php.net/note/edit/88389
Del: integrated -- https://master.php.net/note/delete/88389/integrated
Del: useless -- https://master.php.net/note/delete/88389/useless
Del: bad code -- https://master.php.net/note/delete/88389/bad+code
Del: spam -- https://master.php.net/note/delete/88389/spam
Del: non-english -- https://master.php.net/note/delete/88389/non-english
Del: in docs -- https://master.php.net/note/delete/88389/in+docs
Del: other reasons-- https://master.php.net/note/delete/88389
Reject -- https://master.php.net/note/reject/88389
Search -- https://master.php.net/manage/user-notes.php