how send messages between two proceses?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-27-2007
_mario.lat
 
Posts: n/a
Default how send messages between two proceses?

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.

Reply With Quote
  #2 (permalink)  
Old 01-27-2007
Tyrone Slothrop
 
Posts: n/a
Default Re: how send messages between two proceses?

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.

Reply With Quote
  #3 (permalink)  
Old 01-29-2007
Colin McKinnon
 
Posts: n/a
Default Re: how send messages between two proceses?

_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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0