Posted by Tyrone Slothrop on 01/27/07 16:20
On Sat, 27 Jan 2007 09:50:01 +0100, "_mario.lat"
<_mario.lat@libero.it> wrote:
>hallo,
>I'd like to fork a process so I have 2 process: process A and process B.
>How can send A a message (array of values or a value) to B?
>how can B read the message?
>Thank you in advance for the time you'll spend for me.
>Mario.
Without an example of what exactly you want to do, it is difficult to
help. I will start with a couple very basic questions:
Do you have PCNTL extension installed?
http://us3.php.net/pcntl
Have you reviewed its capabilities and limitations?
The problem with pcntl_exec() is that you pass args to it but it only
returns an error on failure. pcntl_wait() can delay the execution of
a script until the child has executed. Perhaps there is a way to
write the data to a temporary file to be passed to the other process?
I am sure there are others who contibute to this group who are more
experienced with PCNTL than I. I have used it successfully in
running multiple processes in a situation where the processes were
time consuming, like pinging other servers. With more information
they should be able to help you.
[Back to original message]
|