HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
s
shmctl(2) shmctl(2)
[EINVAL] cmd is not a valid command, or the command contains invalid parameters.
[ENOMEM] cmd is equal to SHM_LOCK and there is not sufficient lockable memory to fill the
request.
[EPERM] cmd is equal to IPC_RMID, IPC_SET, SHM_LOCK,orSHM_UNLOCK and the
effective user ID of the calling process is not equal to that of a user having appropriate
privileges and it is not equal to the value of either shm_perm.uid or
shm_perm.cuid in the data structure associated with shmid.
[EPERM] cmd is equal to SHM_LOCK or SHM_UNLOCK and the effective user ID of the calling
process is not equal to that of a user having appropriate privileges and the calling pro-
cess does not have the PRIV_MLOCK privilege (see getprivgrp(2)).
EXAMPLES
The following call to shmctl() locks in memory the shared memory segment represented by myshmid.
This example assumes the process has a valid shmid, which can be obtained by calling shmget(2).
shmctl (myshmid, SHM_LOCK, 0);
The following call to shmctl() removes the shared memory segment represented by
myshmid. This
example assumes the process has a valid shmid, which can be obtained by calling
shmget() (see
shmget(2).
shmctl (myshmid, IPC_RMID, 0);
AUTHOR
shmctl() was developed by AT&T and HP.
SEE ALSO
ipcrm(1), ipcs(1), shmget(2), shmop(2), stdipc(3C).
STANDARDS CONFORMANCE
shmctl(): SVID2, SVID3, XPG2, XPG3, XPG4
Section 2−−326 − 2 − HP-UX Release 11i: December 2000
___
___