#23647 [Csd]: pcntl_fork() reruns forked script
ID: 23647
User updated by: polone at townnews dot com
Reported By: polone at townnews dot com
Status: Closed
Bug Type: *Extensibility Functions
Operating System: Linux
PHP Version: 4.3.1
New Comment:
Verified. This is working 4.3.2RC2.
Previous Comments:
------------------------------------------------------------------------
[2003-05-15 17:51:45] sniper@php.net
Seems to be fixed in CVS. (verify by trying the latest stable
snapshot from http://snaps.php.net)
------------------------------------------------------------------------
[2003-05-15 16:31:33] polone at townnews dot com
The following script:
<?php
echo "Hello!";
if (pcntl_fork()) {
exit;
}
?>
Should produce only one "Hello!". The problem is that it appears to
restart execution of the script, causing the text "Hello!" to appear
twice.
This is _NOT_ how fork() works. The process should continue executing
from where the pcntl_fork() function call was issued, and exit the
parent process.
Is this related to SA_RESTART and changes made to restart signal
handlers in PHP 4.3.0?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23647&edit=1
Thread (3 messages)