Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (1733 KB)
shmctl(2)Name | Synopsis | Description | Return Values | Errors | Attributes | See Also Name
Synopsis#include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> int shmctl(int shmid, int cmd, struct shmid_ds *buf); DescriptionThe shmctl() function provides a variety of shared memory control operations as specified by cmd. The permission required for a shared memory control operation is given as {token}, where token is the type of permission needed. The types of permission are interpreted as follows: 00400 READ by user 00200 WRITE by user 00040 READ by group 00020 WRITE by group 00004 READ by others 00002 WRITE by others See the Shared Memory Operation Permissions section of Intro(2) for more information. The following operations require the specified tokens:
A shared memory segment must be explicitly removed using IPC_RMID before the system can deallocate it and the resources it uses. Return ValuesUpon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. Errors
The shmctl() function will fail if: AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.10 Last Revised 10 Apr 2007Name | Synopsis | Description | Return Values | Errors | Attributes | See Also |
||||