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

  man pages->IRIX man pages -> sem_unlink (3c)              


sem_unlink(2)							 sem_unlink(2)

NAME    [Toc]    [Back]

     sem_unlink	- deletes a posix named	semaphore

C SYNOPSIS    [Toc]    [Back]

     #include <semaphore.h>

     int sem_unlink (const char	*name<b>);

DESCRIPTION    [Toc]    [Back]

     sem_unlink	deletes	the semaphore, named by	the character string at
     address name, from	the file namespace.  The named semaphore and its state
     will persist after	the call to sem_unlink,	if one or more processes still
     reference the semaphore. Once the last reference has been dropped,	the
     semaphore ceases to exist [see sem_close(2)].

     sem_unlink	will fail if one or more of the	following are true:

     [EACCES]	    Search permission is denied	for a component	of the name

     [EACCES]	    Write permission is	denied on the directory	containing the
		    semaphore to be removed and	the process does not have the
		    super-user privilege.

     [EACCES]	    The	parent directory has the sticky	bit set	and the
		    semaphore is not writable by the user; the user does not
		    own	the parent directory and the user does not own the

     [EACCES]	    Write permission is	denied on the semaphore	named by name.

     [EFAULT]	    name points	outside	the process's allocated	address	space.

     [EINTR]	    A signal was caught	during the sem_unlink system call.

     [ELOOP]	    Too	many symbolic links were encountered in	translating

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

     [ENOENT]	    The	named semaphore	does not exist or is a null pathname.

     [ENOTDIR]	    A component	of the name is not a directory.

     [EPERM]	    The	named semaphore	is a directory.

     [EROFS]	    The	semaphore to be	unlinked is part of a read-only	file

									Page 1

sem_unlink(2)							 sem_unlink(2)

SEE ALSO    [Toc]    [Back]

     sem_open(1), sem_close(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
pipcrm HP-UX remove a POSIX message queue or a POSIX named semaphore
sem_open IRIX open a posix named semaphore
sem_close IRIX close a posix named semaphore
sem_getvalue IRIX get the value of a posix named or unnamed semaphore
sem_unlink HP-UX unlink a named POSIX semaphore
sem_close HP-UX close a named POSIX semaphore
sem_open HP-UX create/open a named POSIX semaphore
sem_post IRIX release a posix named or unnamed semaphore
sem_wait IRIX acquire a posix named or unnamed semaphore
sem_getvalue HP-UX get the value of a POSIX semaphore
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service