473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

Jan 27 '07 #1
2 1644
On Sat, 27 Jan 2007 09:50:01 +0100, "_mario.lat" <_m********@libero.itwrote:
>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?
If you are actually forking (as opposed to exec'ing a new process), then
forked processes share filehandles with their parent, so that's one way to
communicate between them. Other methods may include:

Simple command line parameters? http://php.net/system
Pass data via stdin/stdout? http://php.net/proc_open
Sockets? (UNIX, TCP, etc.) http://php.net/sockets

Or see http://en.wikipedia.org/wiki/Inter-p..._communication for more.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 27 '07 #2
_mario.lat wrote:
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?
Unix sockets, TCP, UDP, shared memory.
how can B read the message?
By listening on a socket (Unix sockets, TCP, UDP) or by continuous polling
(shared memory).

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jan 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ray Paseur | last post by:
We broadcast email messages with PHP scripts, but sometimes email is not timely and we would like to send something that could get there faster. Can anyone tell me about how to send Instant...
4
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
5
by: zorhel | last post by:
Hi. My clients will be IE, Mozilla and Opera in a Windows and *nix OS. So, my web app need to, from a server, send messages to a specific client (browser), send messages for all clients,...
2
by: kmbarz | last post by:
I'm trying to expand my horizons here by working through an ASP.Net book. When I do the example that uses: Line 55: Mail.From = "feedback@graymad.com" Line 56: ...
1
by: yoshitha | last post by:
Hi i've to send SMS message to a mobile phone from Pc (using asp.net application) i dont know which namespaces to include and what requirements i need in order to full fill this requirement ...
1
by: yoshitha | last post by:
Hi i've to send SMS message to a mobile phone from Pc (using asp.net application) i dont know which namespaces to include and what requirements i need in order to full fill this requirement ...
2
by: SammyBar | last post by:
Hi all, I'm trying to send a message from ASP.NET to another PC by using MSMQ. I created my ASP.NET project by using Visual Studio 2005 but I initially set the project to be located on the File...
0
by: neonspark | last post by:
I'm buidling some simple macro functionality for my app so the users can record a sequence of keyboard inputs and replay them reliably via some menu. Originally, I used: protected override bool...
7
by: Mark | last post by:
In a standard unmanaged win32 application I can send/post a message to a window as a communication mean. Can it be down also in a dot net application? Regards Mark
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.