derek Fri Jan 21 19:04:02 2005 EDT
Modified files:
/phpdoc/en/reference/pcntl/functions pcntl-fork.xml
Log:
Updating the example to cover Zombie children
http://cvs.php.net/diff.php/phpdoc/en/reference/pcntl/functions/pcntl-fork.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/pcntl/functions/pcntl-fork.xml
diff -u phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.4
phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.5
--- phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.4 Sat Feb 28
10:13:40 2004
+++ phpdoc/en/reference/pcntl/functions/pcntl-fork.xml Fri Jan 21 19:04:01 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.1 -->
<refentry id="function.pcntl-fork">
<refnamediv>
@@ -33,9 +33,10 @@
$pid = pcntl_fork();
if ($pid == -1) {
- die("could not fork");
+ die('could not fork');
} else if ($pid) {
// we are the parent
+ pcntl_wait($status); //Protect against Zombie children
} else {
// we are the child
}