fork and shared memory

New Message Reply Date view Thread view Subject view Author view

Acosta, Mark W (acostmw++at++texaco.com)
Thu, 18 Mar 1999 13:35:40 -0600


I'm seeing some unexpected behavior with my Performer app and shared memory.
Maybe someone here can enlighten me.

In my application, I occasionally allocate chunks of shared memory (c api,
no Performer) and load some data into them. I also need to be able to access
this shared memory in the cull and draw phase of the application. If I'm
running in multiprocess mode, my assumption was that I would have to attach
to the shared memory segments in all app and cull processes since they were
created after Performer forks everything off. Well, a long time ago when I
originally did this, I could swear that this was the case. However, recently
while I was rewriting some stuff, I found that if I create shared memory in
the app process, that the cull and draw processes could access it without
explicitly attaching to it. This doesn't seem right to me. A forked process
will inherit attached shared memory segments from the parent but I wouldn't
expect the children to inherit any shared memory segments created after the
fork. I've tried this under IRIX 6.5 and 6.4 on an Onyx2 and several
Octanes. Can anyone confirm that this is the correct behavior?

Thanks,

Mark Acosta
Texaco
acostmw++at++texaco.com <mailto:acostmw++at++texaco.com>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Mar 18 1999 - 11:36:40 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.