*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/shm_unlink (2)              
Title
Content
Arch
Section
 

Contents


shm_unlink(2)							 shm_unlink(2)


NAME    [Toc]    [Back]

     shm_unlink	- deletes a shared memory object

C SYNOPSIS    [Toc]    [Back]

     #include <sys/mman.h>

     int shm_unlink(const char *path<b>);

DESCRIPTION    [Toc]    [Back]

     path is a pointer to the character	string,	naming a shared	memory object.
     shm_unlink	deletes	the named shared memory	object from the	file
     namespace.	The contents of	the shared memory will persist after the call
     to	shm_unlink, if one or more processes still reference the memory
     object. Once the last reference has been dropped, the space occupied by
     the shared	memory object is freed and the object ceases to	exist [see
     close(2) and munmap(2)].

     The named shared memory object is unlinked	unless one or more of the
     following are true:

     EACCES		 Search	permission is denied for a component of	the
			 path prefix.

     EACCES		 Write permission is denied on the directory
			 containing the	shared memory object to	be removed and
			 the process does not have the super-user privilege.

     EACCES		 The parent directory has the sticky bit set and the
			 shared	memory object is not writable by the user; the
			 user does not own the parent directory	and the	user
			 does not own the shared memory	object.

     EACCES		 Write permission is denied on the shared memory
			 object	named by path.

     EFAULT		 path points outside the process's allocated address
			 space.

     EINTR		 A signal was caught during the	shm_unlink system
			 call.

     ELOOP		 Too many symbolic links were encountered in
			 translating path.

     ENAMETOOLONG	 The length of the path	argument exceeds {PATH_MAX},
			 or the	length of a path component exceeds {NAME_MAX}
			 while _POSIX_NO_TRUNC is in effect.

     ENOENT		 The named shared memory object	does not exist or is a
			 null pathname.





									Page 1






shm_unlink(2)							 shm_unlink(2)



     ENOTDIR		 A component of	the path prefix	is not a directory.

     EPERM		 The named shared memory object	is a directory.

     EROFS		 The shared memory object to be	unlinked is part of a
			 read-only file	system.

SEE ALSO    [Toc]    [Back]

      
      
     shm_open(1), close(2), mmap(2), munmap(2)

DIAGNOSTICS    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of	-1 is returned and errno is set	to indicate the	error.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
shm_open FreeBSD open or create a shared memory object shm_unlink -- remove a shared memory object
shm_open Tru64 Opens a shared memory object, creating the object if necessary (P1003.1b)
shm_unlink FreeBSD remove a shared memory object
shm_unlink HP-UX unlink a shared memory object
shm_open HP-UX create/open a shared memory object
shm_open IRIX establishes a connection between a shared memory object and a file descriptor
shm_unlink Tru64 Removes a shared memory object created by a call to the shm_open function (P1003.1b)
delobj IRIX deletes an object
xlvDelete IRIX deletes an xlv object
objdelete IRIX deletes routines from an object
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service