The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

shm_unlink (3)
  • shm_unlink (3) ( Solaris man: Библиотечные вызовы )
  • >> shm_unlink (3) ( FreeBSD man: Библиотечные вызовы )
  • shm_unlink (3) ( Linux man: Библиотечные вызовы )
  • shm_unlink (3) ( POSIX man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    shm_open , shm_unlink
    
     - shared memory object operations
    
     
    

    LIBRARY

    Lb libc
    
     
    

    SYNOPSIS

       #include <sys/types.h>
       #include <sys/mman.h>
    int shm_open (const char *path int flags mode_t mode);
    int shm_unlink (const char *path);
     

    DESCRIPTION

    The shm_open ();
    function opens (or optionally creates) a POSIX shared memory object named Fa path . The shm_unlink ();
    function removes a shared memory object named Fa path .

       #include <the>
    Fx implementation, POSIX shared memory objects are implemented as ordinary files. The shm_open ();
    and shm_unlink ();
    act as wrappers around the open(2) and unlink(2) routines, and Fa path , Fa flags , and Fa mode arguments are as specified for those functions. The Fa flags argument is checked to ensure that the access mode specified is not O_WRONLY (which is not defined for shared memory objects).

    In addition, the Fx implementation causes mmap ();
    of a descriptor returned by shm_open ();
    to behave as if the MAP_NOSYNC flag had been specified to mmap(2). (It does so by setting a special file flag using fcntl(2).)

    The shm_unlink ();
    function makes no effort to ensure that Fa path refers to a shared memory object.  

    RETURN VALUES

    If successful, shm_open ();
    returns a non-negative integer; shm_unlink ();
    returns zero. Both functions return -1 on failure, and set errno to indicate the error.  

    COMPATIBILITY

    The Fa path argument does not necessarily represent a pathname (although it does in this and most other implementations). Two processes opening the same Fa path are guaranteed to access the same shared memory object if and only if Fa path begins with a slash (`/' ) character.

    Only the O_RDONLY O_RDWR O_CREAT O_EXCL and O_TRUNC flags may be used in portable programs.

    The result of using open(2), read(2), or write(2) on a shared memory object, or on the descriptor returned by shm_open (,);
    is undefined. It is also undefined whether the shared memory object itself, or its contents, persist across reboots.  

    ERRORS

    The shm_open ();
    and shm_unlink ();
    functions can fail with any error defined for open ();
    and unlink (,);
    respectively. In addition, the following errors are defined for shm_open (:);

    Bq Er EINVAL
    The object named by Fa path is not a shared memory object (i.e., it is not a regular file).
    Bq Er EINVAL
    The Fa flags argument to shm_open ();
    specifies an access mode of O_WRONLY

     

    SEE ALSO

    mmap(2), munmap(2), open(2), unlink(2)  

    STANDARDS

    The shm_open ();
    and shm_unlink ();
    functions are believed to conform to St -p1003.1b-93 .  

    HISTORY

    The shm_open ();
    and shm_unlink ();
    functions first appeared in Fx 4.3 .  

    AUTHORS

    An Garrett A. Wollman Aq wollman@FreeBSD.org (C library support and this manual page)

    An Matthew Dillon Aq dillon@FreeBSD.org (MAP_NOSYNC )


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    RETURN VALUES
    COMPATIBILITY
    ERRORS
    SEE ALSO
    STANDARDS
    HISTORY
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру