*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: shmget | Section: 2 | Source: OpenBSD | File: shmget.2
SHMGET(2) FreeBSD System Calls Manual SHMGET(2) NAME shmget - get shared memory area identifier SYNOPSIS #include <sys/shm.h> int shmget(key_t key, size_t size, int shmflg); DESCRIPTION shmget() returns the shared memory identifier associated with the key key. A shared memory segment is created if either key is equal to IPC_PRIVATE, or key does not have a shared memory segment identifier associated with it, and the IPC_CREAT bit is set in shmflg. If a new shared memory segment is created, the data structure associated with it (the shmid_ds structure, see shmctl(2)) is initialized as follows: o shm_perm.cuid and shm_perm.uid are set to the effective uid of the calling process. o shm_perm.gid and shm_perm.cgid are set to the effective gid of the calling process. o shm_perm.mode is set to the lower 9 bits of shmflg. o shm_lpid, shm_nattch, shm_atime, and shm_dtime are set to 0. o shm_ctime is set to the current time. o shm_segsz is set to the value of size. RETURN VALUES Upon successful completion a positive shared memory segment identifier is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error. ERRORS [EACCES] A shared memory segment is already associated with key and the caller has no permission to access it. [EEXIST] Both IPC_CREAT and IPC_EXCL are set in shmflg, and a shared memory segment is already associated with key. [EINVAL] A shared memory segment is already associated with key and its size is less than the requested size. [ENOSPC] A new shared memory identifier could not be created because the system limit for the number of shared memory identifiers has been reached. [ENOENT] IPC_CREAT was not set in shmflg and no shared memory segment associated with key was found. [ENOMEM] There is not enough memory left to create a shared memory segment of the requested size. SEE ALSO ipcrm(1), ipcs(1), mmap(2), shmat(2), shmctl(2), ftok(3) FreeBSD 14.1-RELEASE-p8 November 15, 2014 FreeBSD 14.1-RELEASE-p8

Navigation Options