Jump to content

sending data between processes


alin19

Recommended Posts

<?php
$x=1;
$pid = pcntl_fork();
if ($pid == -1) {
     die('could not fork');
} else if ($pid) {
     $x++; 
     pcntl_wait($status); //Protect against Zombie children
} else {
     echo $x;
}

?>

 

this code is spliting a process in 2;

 

and all the initial var go to the parent and the child process, but i would like to send some vars from the child to the parent.

 

can i do this without sockets or writing to a file, or into a database? i mean sending direcly

Link to comment
https://forums.phpfreaks.com/topic/131505-sending-data-between-processes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.