This is a discussion on how send messages between two proceses? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; hallo, I'd like to fork a process so I have 2 process: process A and process B. How can ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
_mario.lat 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. signals, shared memory, sockets, temporary files, CORBA...it kind of depends what you are trying to achieve, what platform you are running on and how much effort you want to put into it. C. |