IPC_PRIVATE in shared memory
John Knutson
johnk at juniper.UUCP
Fri Jun 3 09:42:33 AEST 1988
In article <1120 at vsedev.VSE.COM> logan at vsedev.VSE.COM (James Logan III) writes:
>I am unable to find any documentations at all on the
>IPC_PRIVATE key that can be passed to the shmget()
>system call.
try the unix system V programmer's guide.
>IPC_PRIVATE is defined in /usr/include/sys/ipc.h and
>has only one ambiguous comment, "private key". Does
>this mean that the region that I attach will be
>accessable only to my process? If so, what is the
>point to bothering the operating system for shared
>memory when the malloc() function yields the same
>results?
the sysV programmer's guide says:
" There is also a provision for specifying a key of value zero which is
known as the private key (IPC_PRIVATE = 0); when specified, a new msqid
is always returned with an associated message queue and data structure
created for it unless a system tunable parameter would be exceeded. When
the ipcs command is performed, for security reasons the KEY field for the
msqid is all zeros."
this doesn't explain much to me, but i hope it does you some good... (i'm using
ipc messages to write a multi-person chat program)
--
John Knutson ihnp4!ut-sally!ut-emx!juniper!johnk
Build on the work of others -Unix System V Programmer's Guide
Rack your brains on interpreting other people's code -Me
Go psycho trying to understand the code you wrote just weeks ago -Me
More information about the Comp.lang.c
mailing list