#23647 [Opn->Csd]: pcntl_fork() reruns forked script

From: Date: Thu, 15 May 2003 22:51:46 +0000
Subject: #23647 [Opn->Csd]: pcntl_fork() reruns forked script
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39741@lists.php.net to get a copy of this message
 ID:               23647
 Updated by:       sniper@php.net
 Reported By:      polone at townnews dot com
-Status:           Open
+Status:           Closed
-Bug Type:         Unknown/Other Function
+Bug Type:         *Extensibility Functions
 Operating System: Linux
 PHP Version:      4.3.1
 New Comment:

Seems to be fixed in CVS. (verify by trying the latest stable 
snapshot from http://snaps.php.net)



Previous Comments:
------------------------------------------------------------------------

[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)

« previous php.bugs (#39741) next »