[comp.unix.xenix] System V Interprocess Communication

peter@stca77.stc.oz (Peter Jeremy) (07/04/88)

I have a couple of questions about SysV IPC.

1) Are the {message queue,semaphore,shared memory} identifiers returned by
   msgget(), semget(), shmget() local to a process, or are they system wide
   values?  I know that under Xenix they are system-wide, but is this just
   due to the implementation or is it specified in SVID?

2) Assuming IPC identifiers are system wide, are they preserved across fork()
   and exec(), or is the child process required to execute an [ipc]get()
   before it can use the identifiers?
   As a specific example:  Can I have one task create some shared memory,
   issue a series of msgget() and semget() calls and save the returned
   identifiers in shared memory, then fork()/exec() a number of children,
   each of which attaches the common memory and uses the message queues and
   semaphores without issuing its own msgget()/semget()?

Please E-mail and I will summarize.
-- 
Peter Jeremy (VK2PJ)         peter%stca77@stcns3.stc.oz
Alcatel-STC Australia        ...!munnari!stcns3.stc.oz!stca77!peter
41 Mandible St               peter%stca77@stcns3.stc.oz@uunet.UU.NET
ALEXANDRIA  NSW  2015