SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) NAME NAME NAME NAME shmget - allocate shared memory segment SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS #include #include int shmget(shmid, size, shmflg) int shmid, size, shmflg; HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY Level: HP-UX/RT Origin: UCB DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Shmget allocates a shared memory segment and associated data structures, and associates it with the shared memory identifier shmid. Shmid is a user-selected integer which uniquely identifies the shared memory segment with which it is associated. Upon creation the data structure associated with the new shared memory identifier is initialized as follows: Shm_perm.cuid, shm_perm.uid, shm_perm.cgid, and shm_perm.gid are set equal to the effective user ID and effective group ID, respectively, of the calling process. The low-order 9 bits of shm_perm.mode are set equal to the low order 9 bits of shmflg. Shm_segsz is set equal to the value of size. Shm_lpid, shm_nattach, shm_atime, and shm_dtime are set equal to 0. Shm_ctime is set equal to the current time. RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE A 0 is returned by shmget on a successful call. ERRORS ERRORS ERRORS ERRORS Shmctl will return -1 and errno will be set if: A shared memory identifier already exists whose value is shmid [EINVAL]. The system imposed limit on the maximum number of shared memory segments (10) would be exceeded [ENOSPC]. There is not sufficient system memory available to create a shared memory segment of the requested size Hewlett-Packard - 1 - (printed 12/12/84) SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) SHMGET(2) HP Integral PC SHMGET(2) [ENOMEM]. SEE ALSO SEE ALSO SEE ALSO SEE ALSO shmctl(2), shmop(2) Hewlett-Packard - 2 - (printed 12/12/84)