mmap with fork
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > mmap with fork




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    mmap with fork  
Tejas Arun Kokje


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-28-04 11:19 PM

Hello

Can some body provide a sample code which uses mmap I/O to pass messages
from from child process to parent

thanks

Tejas Kokje





[ Post a follow-up to this message ]



    Re: mmap with fork  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-28-04 11:19 PM

In article <pan.2004.07.27.20.24.49.31497@usc.edu>,
Tejas Arun Kokje <kokje@usc.edu> wrote:

> Hello
>
> Can some body provide a sample code which uses mmap I/O to pass messages
> from from child process to parent

You do it the same way as you would if they weren't related at all.  If
two processes mmap() the same file, what one process writes to the
memory region will be seen by the other.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***





[ Post a follow-up to this message ]



    Re: mmap with fork  
Frank Cusack


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-28-04 11:19 PM

On Wed, 28 Jul 2004 01:12:33 -0400 Barry Margolin <barmar@alum.mit.edu> wrote:
> In article <pan.2004.07.27.20.24.49.31497@usc.edu>,
>  Tejas Arun Kokje <kokje@usc.edu> wrote:
> 
>
> You do it the same way as you would if they weren't related at all.  If
> two processes mmap() the same file, what one process writes to the
> memory region will be seen by the other.

For MAP_SHARED.

/fc





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:17 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register