icon Top 9 categories map      RocketAware > man pages >

shmget(2)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others



SHMGET(2)                 OpenBSD Programmer's Manual                SHMGET(2)

NAME
     shmget - get shared memory area identifier



SYNOPSIS
     #include <sys/types.h>
     #include <sys/ipc.h>
     #include <sys/shm.h>

     int
     shmget(key_t key, int 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 fol-
     lows:

     -   shm_perm.cuid and shm_perm.uid are set to the effective uid of the
         calling process.

     -   shm_perm.gid and shm_perm.cgid are set to the effective gid of the
         calling process.

     -   shm_perm.mode is set to the lower 9 bits of shmflg.

     -   shm_lpid, shm_nattch, shm_atime, and shm_dtime are set to 0

     -   shm_ctime is set to the current time.

     -   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.

     [ENOSPC]      A new shared memory identifier could not be created because
                   the system limit for the number of shared memory identi-
                   fiers has been reached.

     [ENOENT]      IPC_CREAT was not set in shmflg and no shared memory seg-
                   ment associated with key was found.

     [ENOMEM]      There is not enough memory left to created a shared memory
                   segment of the requested size.

SEE ALSO
     mmap(2),  shmat(2),  shmctl(2)

OpenBSD 2.6                     August 17, 1995                              1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]


[Overview Topics]

Up to: Memory blocks (Sometimes called "Byte Strings") - Memory blocks. Allocated, shared, mmaped, kernel et al


RocketLink!--> Man page versions: OpenBSD FreeBSD NetBSD RedHat Solaris Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > shmget.2/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments