— create and destroy shared
char *path, int
function opens a shared memory object and returns a file descriptor suitable
for use with mmap(2). The flags argument has the same
meaning as provided to open(2) and must include at least
O_RDWR and may
also include a combination of
implementation forces the mode to be 0600 or 0400, and
prohibits sharing between different UIDs.
is used to remove a shared memory object. The object is not freed until all
references to it have been released via
If a temporary shared memory object is desired,
function should be preferred as it avoids several possible security holes
that tend to appear in programs trying to create their own unique temporary
names. The template argument is a string with at least
six trailing Xs as described in
shm_mkstemp() return a file descriptor on successful
completion. They may fail for any of the reasons listed in
shm_unlink() appear in IEEE Std
1003.1-2001 (“POSIX.1”). Using
shm_open() is an extension to that standard. This
implementation deviates from the standard by permitting less sharing.
shm_mkstemp() is an extension.
shm_mkstemp() functions have been available since
Ted Unangst <email@example.com>.