[comp.unix.questions] question on forking & shared memory

chuck@srchtec.uucp (Chuck Howard) (11/20/90)

I'm trying to use multiple processes on a DECstation.  I've been able to 
fork multiple processes, now I need to have the processes access the same
memory.  If anyone has used shared memory after forking processes, could they please mail me some examples of how to do this.  

If there is any interest, I will post a summary of results after I have
received them.

Thanx in advance
Chuck:

cpcahil@virtech.uucp (Conor P. Cahill) (11/25/90)

In article <308@srchtec.UUCP> chuck@srchtec.uucp (Chuck Howard) writes:
>
>I'm trying to use multiple processes on a DECstation.  I've been able to 
>fork multiple processes, now I need to have the processes access the same
>memory.  If anyone has used shared memory after forking processes,

The key to this is to create and attach to the shared memory segment
before you fork.  That way all of the processes have the same
shared memory segment attached at the same location without any extra
work for you to do.
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170