Syntax | #include <sys/shm.h> int shmctl(int shmid, int cmd, struct shmid_ds *buf); CRTE111A30 int shmctl64(int shmid, int cmd, struct shmid_ds64 *buf); (End) | |
Description |
The function The struct ipc_perm shm_perm; /* operation permission struct */ int shm_segsz; /* size of segment in bytes */ ulong_t *shm_shmat; /* hidden */ ushort_t shm_dummy; /* shm_lkcnt - no longer used! */ pid_t shm_lpid; /* pid of last shmop */ pid_t shm_cpid; /* pid of creator */ ulong_t shm_nattch; /* used only for shminfo */ ulong_t shm_cnattch; /* used only for shminfo */ time_t shm_atime; /* last shmat time */ time_t shm_dtime; /* last shmdt time */ time_t shm_ctime; /* last change time */ The elements of the structure time64_t shm_atime; time64_t shm_dtime; time64_t shm_ctime; | |
The following values for cmd are available: | ||
|
| Enter the current values of all members of the |
|
| Set the values of the following members of the shm_perm.uid shm_perm.gid shm_perm.mode /* only the low-order 9 bits */
|
|
| Remove the shared memory identifier specified by shmid from the system as well as the shared memory segment and the |
Return val. | 0 | if successful. |
-1 | if an error occurs. | |
Errors |
| |
|
| cmd is equal to |
| Extension | |
|
| msgp points to an invalid address. (End) |
|
| The value of shmid is not a valid shared memory identifier, or |
| Extension | |
|
| Not enough memory is available. |
|
| cmd is equal to |
| ||
|
| cmd is equal to |
| ||
|
| POSIX-BC correction status < A47. |
See also |
|