You are here: Re: how send messages between two proceses? « PHP Programming Language « IT news, forums, messages
Re: how send messages between two proceses?

Posted by Andy Hassall on 01/27/07 11:43

On Sat, 27 Jan 2007 09:50:01 +0100, "_mario.lat" <_mario.lat@libero.it> 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?
>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-process_communication for more.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация